-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add displayMinutes option to time component (#1097)
* Add displayMinute option to time component * Add hours disable option * minor fix * details
- Loading branch information
jmarkowski
committed
Aug 21, 2019
1 parent
fead4ca
commit d5c5c4a
Showing
16 changed files
with
121 additions
and
24 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
5 changes: 5 additions & 0 deletions
5
...ntation/component-docs/time-picker/examples/time-picker-only-hours-example.component.html
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,5 @@ | ||
<fd-time-picker [displaySeconds]="false" | ||
[displayMinutes]="false" | ||
[(ngModel)]="timePickerOnlyHoursObject"></fd-time-picker> | ||
<br /> | ||
Selected Time: {{timePickerOnlyHoursObject.hour}}h |
39 changes: 25 additions & 14 deletions
39
docs/app/documentation/component-docs/time-picker/time-picker-docs.component.html
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 |
---|---|---|
@@ -1,63 +1,74 @@ | ||
<h2>24-Hour Time Picker</h2> | ||
<description>This is the default time picker setting.</description> | ||
<component-example [name]="'ex1'"> | ||
<fd-time-picker-example></fd-time-picker-example> | ||
<fd-time-picker-example></fd-time-picker-example> | ||
</component-example> | ||
<code-example [exampleFiles]="timePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>12-Hour Time Picker</h2> | ||
<description>Set <code>[meridian]="true"</code> to use a 12-hour clock.</description> | ||
<component-example [name]="'ex2'"> | ||
<fd-time-picker-12-example></fd-time-picker-12-example> | ||
<fd-time-picker-12-example></fd-time-picker-12-example> | ||
</component-example> | ||
<code-example [exampleFiles]="meridianTimePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Time Picker Without Seconds</h2> | ||
<description>Use <code>[displaySeconds]=false</code> to turn off seconds for the time picker.</description> | ||
<component-example [name]="'ex3'"> | ||
<fd-time-picker-no-seconds-example></fd-time-picker-no-seconds-example> | ||
<fd-time-picker-no-seconds-example></fd-time-picker-no-seconds-example> | ||
</component-example> | ||
<code-example [exampleFiles]="timePickerNoSeconds"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Time Picker Without Minutes and Seconds</h2> | ||
<description>Use <code>[displaySeconds]="false"</code>, <code>[displayMinutes]="false"</code> or <code>[displayHours]="false"</code> | ||
to turn off seconds, minutes or hours for the time picker. At least one of them should be enabled. | ||
</description> | ||
<component-example [name]="'ex4'"> | ||
<fd-time-picker-only-hours-example></fd-time-picker-only-hours-example> | ||
</component-example> | ||
<code-example [exampleFiles]="timePickerOnlyHours"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Disabled Time Picker</h2> | ||
<description>Set <code>[disabled]="true"</code> to disable the time picker.</description> | ||
<component-example [name]="'ex4'"> | ||
<fd-time-picker-disabled-example></fd-time-picker-disabled-example> | ||
<component-example [name]="'ex5'"> | ||
<fd-time-picker-disabled-example></fd-time-picker-disabled-example> | ||
</component-example> | ||
<code-example [exampleFiles]="disabledTimePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Compact Time Picker</h2> | ||
<description>Set <code>[compact]="true"</code> to use compact time-picker.</description> | ||
<component-example [name]="'ex5'"> | ||
<fd-time-picker-compact-example></fd-time-picker-compact-example> | ||
<component-example [name]="'ex6'"> | ||
<fd-time-picker-compact-example></fd-time-picker-compact-example> | ||
</component-example> | ||
<code-example [exampleFiles]="compactTimePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Null Validity</h2> | ||
<description>Null input values are considered valid by default. Use <code>[allowNull]="false"</code> to make them | ||
invalid.</description> | ||
<component-example [name]="'ex6'"> | ||
<fd-time-picker-allow-null-example></fd-time-picker-allow-null-example> | ||
invalid. | ||
</description> | ||
<component-example [name]="'ex7'"> | ||
<fd-time-picker-allow-null-example></fd-time-picker-allow-null-example> | ||
</component-example> | ||
<code-example [exampleFiles]="nullTimePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Formatting</h2> | ||
<description>Providing a custom format for time is possible through providing service</description> | ||
<component-example [name]="'ex7'"> | ||
<fd-time-picker-other-delimiter-example></fd-time-picker-other-delimiter-example> | ||
<component-example [name]="'ex8'"> | ||
<fd-time-picker-other-delimiter-example></fd-time-picker-other-delimiter-example> | ||
</component-example> | ||
<code-example [exampleFiles]="otherFormatTimePicker"></code-example> | ||
|
||
<separator></separator> | ||
<h2>Time Picker in Form</h2> | ||
<description>The time-picker component may also be used together with Angular reactive forms.</description> | ||
<component-example [name]="'ex7'"> | ||
<fd-time-picker-form-example></fd-time-picker-form-example> | ||
<component-example [name]="'ex9'"> | ||
<fd-time-picker-form-example></fd-time-picker-form-example> | ||
</component-example> | ||
<code-example [exampleFiles]="timePickerForm"></code-example> |
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
5 changes: 5 additions & 0 deletions
5
docs/app/documentation/component-docs/time/examples/time-only-hours-example.component.html
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,5 @@ | ||
<fd-time [displaySeconds]="false" | ||
[displayMinutes]="false" | ||
[(ngModel)]="onlyHoursTime"></fd-time> | ||
<br /> | ||
Selected Time: {{onlyHoursTime.hour}}h |
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
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
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