-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datetime): add styling for datetime with different labels
fixes #6764
- Loading branch information
1 parent
4eb8ede
commit adcd2fc
Showing
12 changed files
with
144 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@import "../../globals.md"; | ||
@import "./datetime"; | ||
|
||
// Material Design DateTime | ||
// -------------------------------------------------- | ||
|
||
$datetime-md-padding-top: $item-md-padding-top !default; | ||
$datetime-md-padding-right: ($item-md-padding-right / 2) !default; | ||
$datetime-md-padding-bottom: $item-md-padding-bottom !default; | ||
$datetime-md-padding-left: $item-md-padding-left !default; | ||
|
||
|
||
ion-datetime { | ||
padding: $datetime-md-padding-top $datetime-md-padding-right $datetime-md-padding-bottom $datetime-md-padding-left; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@import "../../globals.wp"; | ||
@import "./datetime"; | ||
|
||
// Windows DateTime | ||
// -------------------------------------------------- | ||
|
||
$datetime-wp-min-width: 45% !default; | ||
|
||
$datetime-wp-padding-top: $item-wp-padding-top !default; | ||
$datetime-wp-padding-right: ($item-wp-padding-right / 2) !default; | ||
$datetime-wp-padding-bottom: $item-wp-padding-bottom !default; | ||
$datetime-wp-padding-left: $item-wp-padding-left !default; | ||
|
||
$datetime-wp-border-width: 2px !default; | ||
$datetime-wp-border-color: $input-wp-border-color !default; | ||
|
||
ion-datetime { | ||
padding: $datetime-wp-padding-top $datetime-wp-padding-right $datetime-wp-padding-bottom $datetime-wp-padding-left; | ||
min-width: $datetime-wp-min-width; | ||
} | ||
|
||
.datetime-text { | ||
border: $datetime-wp-border-width solid $datetime-wp-border-color; | ||
line-height: 3rem; | ||
min-height: 3.4rem; | ||
padding: 0 8px; | ||
} | ||
|
||
.item-datetime ion-label[floating] { | ||
transform: translate3d(8px, 41px, 0); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {Component} from '@angular/core'; | ||
import {ionicBootstrap} from '../../../../../src'; | ||
|
||
|
||
@Component({ | ||
templateUrl: 'main.html' | ||
}) | ||
class E2EPage { | ||
stacked2 = '1994-12-15T13:47:20.789'; | ||
floating2 = '1995-04-15'; | ||
fixed2 = '2002-09-23T15:03:46.789'; | ||
inline2 = '2005-06-17T11:06Z'; | ||
} | ||
|
||
|
||
@Component({ | ||
template: '<ion-nav [root]="root"></ion-nav>' | ||
}) | ||
class E2EApp { | ||
root = E2EPage; | ||
} | ||
|
||
ionicBootstrap(E2EApp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<ion-toolbar> | ||
<ion-title>Datetime</ion-title> | ||
</ion-toolbar> | ||
|
||
<ion-content class="outer-content"> | ||
|
||
<ion-item> | ||
<ion-label stacked>Stacked</ion-label> | ||
<ion-datetime [(ngModel)]="stacked1"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label stacked>Stacked</ion-label> | ||
<ion-datetime [(ngModel)]="stacked2"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label floating>Floating</ion-label> | ||
<ion-datetime displayFormat="MMMM YY" [(ngModel)]="floating1"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label floating>Floating</ion-label> | ||
<ion-datetime displayFormat="D MMM YYYY"[(ngModel)]="floating2"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label fixed>Fixed</ion-label> | ||
<ion-datetime displayFormat="MM/DD/YYYY" [(ngModel)]="fixed1"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label fixed>Fixed</ion-label> | ||
<ion-datetime displayFormat="DDDD MMM D, YYYY" [(ngModel)]="fixed2"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label>Inline</ion-label> | ||
<ion-datetime displayFormat="MM/DD/YYYY" [(ngModel)]="inline1"></ion-datetime> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label>Inline</ion-label> | ||
<ion-datetime displayFormat="DDDD MMM D, YYYY" [(ngModel)]="inline2"></ion-datetime> | ||
</ion-item> | ||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters