fix(time-picker): properly handle 0 on hour and minutes with valueChanged (#10460)

closes https://github.com/NativeScript/NativeScript/issues/10457
This commit is contained in:
Nathan Walker
2023-12-17 15:17:32 -08:00
committed by GitHub
parent 82e9c67d33
commit 4762699fa1
4 changed files with 28 additions and 2 deletions

View File

@@ -10,6 +10,8 @@ export function navigatingTo(args: EventData) {
export class SampleData extends Observable {
minDate = new Date();
maxDate = new Date(2030, 7, 1);
hour = 8;
minute = 0;
displayDate = {
day: new Date().getDate(),
month: new Date().getMonth(),

View File

@@ -16,5 +16,9 @@ year="{{displayDate?.year}}"
<Switch checked="true" col="0" checkedChange="{{checkedChange}}" />
<Label text="Show Time" col="1" class="m-l-10" />
</GridLayout>
<GridLayout rows="auto,auto" columns="">
<Label text="Time Picker standalone:" row="0" col="0" class="m-t-10" />
<TimePicker row="1" hour="{{hour}}" minute="{{minute}}"></TimePicker>
</GridLayout>
</StackLayout>
</Page>