| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,6 +99,24 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke | |||
| 99 | 99 | TKUnit.assertEqual(actualValue, expectedValue); | |
| 100 | 100 | } | |
| 101 | 101 | ||
| 102 | + public test_WhenCreated_NativeYearIsCurrentYear() { | ||
| 103 | + const actualValue = datePickerTestsNative.getNativeYear(this.testView); | ||
| 104 | + const expectedValue = currentDate.getFullYear(); | ||
| 105 | + TKUnit.assertEqual(actualValue, expectedValue); | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public test_WhenCreated_NativeMonthIsCurrentMonth() { | ||
| 109 | + const actualValue = datePickerTestsNative.getNativeMonth(this.testView); | ||
| 110 | + const expectedValue = currentDate.getMonth() + 1; | ||
| 111 | + TKUnit.assertEqual(actualValue, expectedValue); | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public test_WhenCreated_NativeDayIsCurrentDay() { | ||
| 115 | + const actualValue = datePickerTestsNative.getNativeDay(this.testView);; | ||
| 116 | + const expectedValue = currentDate.getDate(); | ||
| 117 | + TKUnit.assertEqual(actualValue, expectedValue); | ||
| 118 | + } | ||
| 119 | + | ||
| 102 | 120 | public testYearFromLocalToNative() { | |
| 103 | 121 | const expectedValue = 1980; | |
| 104 | 122 | this.testView.year = expectedValue; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,7 +59,7 @@ export class DatePicker extends DatePickerBase { | |||
| 59 | 59 | picker.setCalendarViewShown(false); | |
| 60 | 60 | const listener = new DateChangedListener(this); | |
| 61 | 61 | ||
| 62 | - picker.init(this.year, this.month, this.day, listener); | ||
| 62 | + picker.init(this.year, this.month - 1, this.day, listener); | ||
| 63 | 63 | (<any>picker).listener = listener; | |
| 64 | 64 | return picker; | |
| 65 | 65 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments