1# Date Picker Dialog Box (DatePickerDialog) 2 3A date picker dialog box is a dialog box that allows users to select a date from the given range. 4 5> **NOTE** 6> 7> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. 8> 9> The functionality of this module depends on UI context. This means that the APIs of this module cannot be used where the UI context is unclear. For details, see [UIContext](../js-apis-arkui-UIContext.md#uicontext). 10> 11> Since API version 10, you can use the [showDatePickerDialog](../js-apis-arkui-UIContext.md#showdatepickerdialog) API in [UIContext](../js-apis-arkui-UIContext.md#uicontext), which ensures that the date picker dialog box is shown in the intended UI instance. 12 13## DatePickerDialog 14 15### show 16 17static show(options?: DatePickerDialogOptions) 18 19Shows a date picker dialog box. 20 21**Atomic service API**: This API can be used in atomic services since API version 11. 22 23**System capability**: SystemCapability.ArkUI.ArkUI.Full 24 25**Parameters** 26 27| Name | Type | Mandatory| Description | 28| ------- | ----------------------------------------------------------- | ---- | -------------------------- | 29| options | [DatePickerDialogOptions](#datepickerdialogoptions) | No | Parameters of the date picker dialog box.| 30 31## DatePickerDialogOptions 32 33Inherited from [DatePickerOptions](ts-basic-components-datepicker.md#datepickeroptions). 34 35**System capability**: SystemCapability.ArkUI.ArkUI.Full 36 37| Name| Type| Mandatory| Description| 38| -------- | -------- | -------- | -------- | 39| lunar | boolean | No| Whether to display the lunar calendar. The value **true** means to display the lunar calendar, and **false** means the opposite.<br>Default value: **false**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 40| showTime<sup>10+</sup> | boolean | No| Whether to display the time item. The value **true** means to display the time item, and **false** means the opposite.<br>Default value: **false**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 41| useMilitaryTime<sup>10+</sup> | boolean | No| Whether to display time in 24-hour format. The value **true** means to display time in 24-hour format, and **false** means the opposite.<br>Default value: **false**<br>**NOTE**<br>When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 42| lunarSwitch<sup>10+</sup> | boolean | No| Whether to display the lunar calendar switch. The value **true** means to display the lunar calendar switch, and **false** means the opposite.<br>Default value: **false**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 43| lunarSwitchStyle<sup>14+</sup> | [LunarSwitchStyle](#lunarswitchstyle14) | No| Style of the lunar calendar switch.<br>Default value: **{ selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }**<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 44| disappearTextStyle<sup>10+</sup> | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width for the top and bottom items.<br>Default value:<br>{<br>color: '#ff182431',<br>font: {<br>size: '14fp', <br>weight: FontWeight.Regular<br>}<br>}<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 45| textStyle<sup>10+</sup> | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width of all items except the top, bottom, and selected items.<br>Default value:<br>{<br>color: '#ff182431',<br>font: {<br>size: '16fp', <br>weight: FontWeight.Regular<br>}<br>}<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 46| selectedTextStyle<sup>10+</sup> | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width of the selected item.<br>Default value:<br>{<br>color: '#ff007dff',<br>font: {<br>size: '20vp', <br>weight: FontWeight.Medium<br>}<br>} <br>**Atomic service API**: This API can be used in atomic services since API version 11.| 47| acceptButtonStyle<sup>12+</sup> | [PickerDialogButtonStyle](#pickerdialogbuttonstyle12) | No| Style of the accept button.<br>**NOTE**<br>In the **acceptButtonStyle** and **cancelButtonStyle** configurations, only one **primary** field can be set to **true** at most. If both the **primary** fields are set to **true**, neither will take effect.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 48| cancelButtonStyle<sup>12+</sup> | [PickerDialogButtonStyle](#pickerdialogbuttonstyle12) | No| Style of the cancel button.<br>**NOTE**<br>In the **acceptButtonStyle** and **cancelButtonStyle** configurations, only one **primary** field can be set to **true** at most. If both the **primary** fields are set to **true**, neither will take effect.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 49| alignment<sup>10+</sup> | [DialogAlignment](ts-methods-alert-dialog-box.md#dialogalignment) | No | Alignment mode of the dialog box in the vertical direction.<br>Default value: **DialogAlignment.Default**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 50| offset<sup>10+</sup> | [Offset](ts-types.md#offset) | No | Offset of the dialog box based on the **alignment** settings.<br>Default value: **{ dx: 0 , dy: 0 }**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 51| maskRect<sup>10+</sup>| [Rectangle](ts-methods-alert-dialog-box.md#rectangle8) | No | Mask area of the dialog box. Events outside the mask area are transparently transmitted, and events within the mask area are not.<br>Default value: **{ x: 0, y: 0, width: '100%', height: '100%' }**<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 52| onAccept<sup>(deprecated)</sup> | (value: [DatePickerResult](ts-basic-components-datepicker.md#datepickerresult)) => void | No| Callback invoked when the OK button in the dialog box is clicked.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 10. You are advised to use **onDateAccept** instead.| 53| onCancel | [VoidCallback](ts-types.md#voidcallback12) | No| Callback invoked when the Cancel button in the dialog box is clicked.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 54| onChange<sup>(deprecated)</sup> | (value: [DatePickerResult](ts-basic-components-datepicker.md#datepickerresult)) => void | No| Callback invoked when the selected item in the picker changes.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 10. You are advised to use **onDateChange** instead.| 55| onDateAccept<sup>10+</sup> | [Callback](ts-types.md#callback12)\<Date> | No| Callback invoked when the OK button in the dialog box is clicked.<br>**NOTE**<br>When **showTime** is set to **true**, the hour and minute in the value returned by the callback are the hour and minute selected in the picker. Otherwise, the hour and minute are the hour and minute of the system time.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 56| onDateChange<sup>10+</sup> | [Callback](ts-types.md#callback12)\<Date> | No| Callback invoked when the selected item in the picker changes.<br>**NOTE**<br>When **showTime** is set to **true**, the hour and minute in the value returned by the callback are the hour and minute selected in the picker. Otherwise, the hour and minute are the hour and minute of the system time.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 57| backgroundColor<sup>11+</sup> | [ResourceColor](ts-types.md#resourcecolor) | No| Backplane color of the dialog box.<br>Default value: **Color.Transparent**<br>**NOTE**<br>When **backgroundColor** is set to a non-transparent color, **backgroundBlurStyle** must be set to **BlurStyle.NONE**; otherwise, the color display may not meet the expected effect.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 58| backgroundBlurStyle<sup>11+</sup> | [BlurStyle](ts-universal-attributes-background.md#blurstyle9) | No| Background blur style of the dialog box.<br>Default value: **BlurStyle.COMPONENT_ULTRA_THICK**<br>**NOTE**<br>Setting this parameter to **BlurStyle.NONE** disables the background blur. When **backgroundBlurStyle** is set to a value other than **NONE**, do not set **backgroundColor**. If you do, the color display may not produce the expected visual effect.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 59| onDidAppear<sup>12+</sup> | [VoidCallback](ts-types.md#voidcallback12) | No| Event callback when the dialog box appears.<br>**NOTE**<br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear.<br>2. You can set the callback event for changing the dialog box display effect in **onDidAppear**. The settings take effect next time the dialog box appears.<br>3. If the user closes the dialog box immediately after it appears, **onWillDisappear** is invoked before **onDidAppear**.<br>4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 60| onDidDisappear<sup>12+</sup> | [VoidCallback](ts-types.md#voidcallback12) | No| Event callback when the dialog box disappears.<br>**NOTE**<br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 61| onWillAppear<sup>12+</sup> | [VoidCallback](ts-types.md#voidcallback12) | No| Event callback when the dialog box is about to appear.<br>**NOTE**<br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear.<br>2. You can set the callback event for changing the dialog box display effect in **onWillAppear**. The settings take effect next time the dialog box appears.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 62| onWillDisappear<sup>12+</sup> | [VoidCallback](ts-types.md#voidcallback12) | No| Event callback when the dialog box is about to disappear.<br>**NOTE**<br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear.<br>2. If the user closes the dialog box immediately after it appears, **onWillDisappear** is invoked before **onDidAppear**.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 63| shadow<sup>12+</sup> | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions) \| [ShadowStyle](ts-universal-attributes-image-effect.md#shadowstyle10) | No | Shadow of the dialog box.<br> Default value on 2-in-1 devices: **ShadowStyle.OUTER_FLOATING_MD** when the dialog box is focused and **ShadowStyle.OUTER_FLOATING_SM** otherwise<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 64| dateTimeOptions<sup>12+</sup> | [DateTimeOptions](../../apis-localization-kit/js-apis-intl.md#datetimeoptions) | No| Whether to display a leading zero for the hours and minutes. Currently only the configuration of the **hour** and **minute** parameters is supported.<br>Default value:<br>**hour**: In the 24-hour format, it defaults to **2-digit**, which means a leading zero is used; In the 12-hour format, it defaults to **numeric**, which means no leading zero is used.<br>**minute**: defaults to **2-digit**, which means a leading zero is used.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 65| enableHoverMode<sup>14+</sup> | boolean | No | Whether to enable the hover mode.<br>Default value: **false**, meaning not to enable the hover mode.<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 66| hoverModeArea<sup>14+</sup> | [HoverModeAreaType](ts-appendix-enums.md#hovermodeareatype14) | No | Display area of the dialog box in hover mode.<br>Default value: **HoverModeAreaType.BOTTOM_SCREEN**<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 67 68## LunarSwitchStyle<sup>14+</sup> 69 70Defines the style of the lunar calendar switch in the **DatePickerDialog** component. 71 72**Atomic service API**: This API can be used in atomic services since API version 14. 73 74**System capability**: SystemCapability.ArkUI.ArkUI.Full 75 76| Name | Type | Mandatory| Description | 77| ------ |-------------------|-----|----------| 78| selectedColor| [ResourceColor](ts-types.md#resourcecolor) | No | Background color of the switch when it is on.<br>Default value: **$r('sys.color.ohos_id_color_text_primary_actived')**| 79| unselectedColor | [ResourceColor](ts-types.md#resourcecolor) | No | Border color of the switch when it is off.<br>Default value: **$r('sys.color.ohos_id_color_switch_outline_off')**| 80| strokeColor | [ResourceColor](ts-types.md#resourcecolor) | No | Color of the icon inside the switch.<br>Default value: **Color.White**| 81 82## PickerDialogButtonStyle<sup>12+</sup> 83 84**Atomic service API**: This API can be used in atomic services since API version 12. 85 86**System capability**: SystemCapability.ArkUI.ArkUI.Full 87 88| Name | Type | Mandatory | Description | 89| ----- | ---------------------------------------- | ---- | ------------------------- | 90| type | [ButtonType](ts-basic-components-button.md#buttontype) | No | Button type. | 91| style | [ButtonStyleMode](ts-basic-components-button.md#buttonstylemode11) | No | Style and importance of the button.| 92| role | [ButtonRole](ts-basic-components-button.md#buttonrole12) | No | Role of the button. | 93| fontSize | [Length](ts-types.md#length) | No | Font size of the button.| 94| fontColor | [ResourceColor](ts-types.md#resourcecolor) | No | Font color of the button. | 95| fontWeight | [FontWeight](ts-appendix-enums.md#fontweight) \| number \| string| No | Font weight of the button. For the number type, the value ranges from 100 to 900, at an interval of 100. A larger value indicates a thicker font.| 96| fontStyle | [FontStyle](ts-appendix-enums.md#fontstyle) | No | Font style of the button. | 97| fontFamily | [Resource](ts-types.md#resource) \| string | No | Font family of the button. The 'HarmonyOS Sans' font and [registered custom fonts](../js-apis-font.md) are supported.| 98| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | No | Background color of the button. | 99| borderRadius | [Length](ts-types.md#length) \| [BorderRadiuses](ts-types.md#borderradiuses9)| No | Rounded corner radius of the button.| 100| primary | boolean | No | Whether the button responds to the **Enter** key by default when the dialog box has focus and the **Tab** key is not pressed for sequential focus navigation.| 101 102**Handling in the case of exceptions** 103 104| Exception | Result | 105| -------- | ------------------------------------------------------------ | 106| The start date is later than the end date, and the selected date is not set. | The start date, end date, and selected date are set to the default values. | 107| The start date is later than the end date, and the selected date is earlier than the default start date. | The start date and end date are set to the default values, and the selected date is set to the default start date. | 108| The start date is later than the end date, and the selected date is later than the default end date. | The start date and end date are set to the default values, and the selected date is set to the default end date. | 109| The start date is later than the end date, and the selected date is within the range of the default start date and end date. | The start date and end date are set to the default values, and the selected date is set to the specified value.| 110| The selected date is earlier than the start date. | The selected date is set to the start date. | 111| The selected date is later than the end date. | The selected date is set to the end date. | 112| The start date is later than the current system date, and the selected date is not set. | The selected date is set to the start date. | 113| The end date is earlier than the current system date, and the selected date is not set. | The selected date is set to the end date. | 114| The set date is in invalid format, for example, **'1999-13-32'**. | The default value is used. | 115| The start date or end date is earlier than the valid date range. | The start date or end date is set to the earliest date in the valid date range. | 116| The start date or end date is later than the valid date range. | The start date or end date is set to the latest date in the valid date range. | 117 118The valid date range is from 1900-1-31 to 2100-12-31. 119 120The exception detection and handling with the selected date comes after that with the start date and end date. 121 122## Example 123 124> **NOTE** 125> 126> For clarity in UI execution context, you are advised to use the [showDatePickerDialog](../js-apis-arkui-UIContext.md#showdatepickerdialog) API in [UIContext](../js-apis-arkui-UIContext.md#uicontext). 127 128### Example 1: Displaying a Date Picker Dialog Box 129 130This example demonstrates how to display a text picker dialog box when a button is touched. 131 132```ts 133// xxx.ets 134@Entry 135@Component 136struct DatePickerDialogExample { 137 selectedDate: Date = new Date("2010-1-1") 138 139 build() { 140 Column() { 141 Button("DatePickerDialog") 142 .margin(20) 143 .onClick(() => { 144 DatePickerDialog.show({ // You are advised to use this.getUIContext().showDatePickerDialog(). 145 start: new Date("2000-1-1"), 146 end: new Date("2100-12-31"), 147 selected: this.selectedDate, 148 showTime:true, 149 useMilitaryTime:false, 150 disappearTextStyle: {color: Color.Pink, font: {size: '22fp', weight: FontWeight.Bold}}, 151 textStyle: {color: '#ff00ff00', font: {size: '18fp', weight: FontWeight.Normal}}, 152 selectedTextStyle: {color: '#ff182431', font: {size: '14fp', weight: FontWeight.Regular}}, 153 onDateAccept: (value: Date) => { 154 // Use the setFullYear method to set the date when the OK button is touched. In this way, when the date picker dialog box is displayed again, the selected date is the date last confirmed. 155 this.selectedDate = value 156 console.info("DatePickerDialog:onDateAccept()" + value.toString()) 157 }, 158 onCancel: () => { 159 console.info("DatePickerDialog:onCancel()") 160 }, 161 onDateChange: (value: Date) => { 162 console.info("DatePickerDialog:onDateChange()" + value.toString()) 163 }, 164 onDidAppear: () => { 165 console.info("DatePickerDialog:onDidAppear()") 166 }, 167 onDidDisappear: () => { 168 console.info("DatePickerDialog:onDidDisappear()") 169 }, 170 onWillAppear: () => { 171 console.info("DatePickerDialog:onWillAppear()") 172 }, 173 onWillDisappear: () => { 174 console.info("DatePickerDialog:onWillDisappear()") 175 } 176 }) 177 }) 178 179 Button("Lunar DatePickerDialog") 180 .margin(20) 181 .onClick(() => { 182 DatePickerDialog.show({ 183 start: new Date("2000-1-1"), 184 end: new Date("2100-12-31"), 185 selected: this.selectedDate, 186 lunar: true, 187 disappearTextStyle: {color: Color.Pink, font: {size: '22fp', weight: FontWeight.Bold}}, 188 textStyle: {color: '#ff00ff00', font: {size: '18fp', weight: FontWeight.Normal}}, 189 selectedTextStyle: {color: '#ff182431', font: {size: '14fp', weight: FontWeight.Regular}}, 190 onDateAccept: (value: Date) => { 191 this.selectedDate = value 192 console.info("DatePickerDialog:onDateAccept()" + value.toString()) 193 }, 194 onCancel: () => { 195 console.info("DatePickerDialog:onCancel()") 196 }, 197 onDateChange: (value: Date) => { 198 console.info("DatePickerDialog:onDateChange()" + value.toString()) 199 }, 200 onDidAppear: () => { 201 console.info("DatePickerDialog:onDidAppear()") 202 }, 203 onDidDisappear: () => { 204 console.info("DatePickerDialog:onDidDisappear()") 205 }, 206 onWillAppear: () => { 207 console.info("DatePickerDialog:onWillAppear()") 208 }, 209 onWillDisappear: () => { 210 console.info("DatePickerDialog:onWillDisappear()") 211 } 212 }) 213 }) 214 }.width('100%') 215 } 216} 217``` 218 219 220 221### Example 2: Customizing the Style 222 223In this example, **disappearTextStyle**, **textStyle**, **selectedTextStyle**, **acceptButtonStyle**, and **cancelButtonStyle** are configured to customize the text and button style. 224 225```ts 226// xxx.ets 227@Entry 228@Component 229struct DatePickerDialogExample { 230 selectedDate: Date = new Date("2010-1-1") 231 232 build() { 233 Column() { 234 Button("DatePickerDialog") 235 .margin(20) 236 .onClick(() => { 237 DatePickerDialog.show({ 238 start: new Date("2000-1-1"), 239 end: new Date("2100-12-31"), 240 selected: this.selectedDate, 241 showTime:true, 242 useMilitaryTime:false, 243 disappearTextStyle: {color: Color.Pink, font: {size: '22fp', weight: FontWeight.Bold}}, 244 textStyle: {color: '#ff00ff00', font: {size: '18fp', weight: FontWeight.Normal}}, 245 selectedTextStyle: {color: '#ff182431', font: {size: '14fp', weight: FontWeight.Regular}}, 246 acceptButtonStyle: { type: ButtonType.Normal, style: ButtonStyleMode.NORMAL, role: ButtonRole.NORMAL, fontColor: Color.Red, 247 fontSize: '26fp', fontWeight: FontWeight.Bolder, fontStyle: FontStyle.Normal, fontFamily: 'sans-serif', backgroundColor:'#80834511', 248 borderRadius: 20 }, 249 cancelButtonStyle: { type: ButtonType.Normal, style: ButtonStyleMode.NORMAL, role: ButtonRole.NORMAL, fontColor: Color.Blue, 250 fontSize: '16fp', fontWeight: FontWeight.Normal, fontStyle: FontStyle.Italic, fontFamily: 'sans-serif', backgroundColor:'#50182431', 251 borderRadius: 10 }, 252 onDateAccept: (value: Date) => { 253 // Use the setFullYear method to set the date when the OK button is touched. In this way, when the date picker dialog box is displayed again, the selected date is the date last confirmed. 254 this.selectedDate = value 255 console.info("DatePickerDialog:onDateAccept()" + value.toString()) 256 }, 257 onCancel: () => { 258 console.info("DatePickerDialog:onCancel()") 259 }, 260 onDateChange: (value: Date) => { 261 console.info("DatePickerDialog:onDateChange()" + value.toString()) 262 }, 263 onDidAppear: () => { 264 console.info("DatePickerDialog:onDidAppear()") 265 }, 266 onDidDisappear: () => { 267 console.info("DatePickerDialog:onDidDisappear()") 268 }, 269 onWillAppear: () => { 270 console.info("DatePickerDialog:onWillAppear()") 271 }, 272 onWillDisappear: () => { 273 console.info("DatePickerDialog:onWillDisappear()") 274 } 275 }) 276 }) 277 }.width('100%') 278 } 279} 280``` 281 282 283 284> **NOTE** 285> 286> To implement a fully customized date picker dialog box, create a [custom dialog box](ts-methods-custom-dialog-box.md) and then implement the [\<DatePicker>](ts-basic-components-datepicker.md) component. 287 288### Example 3: Configuring a Dialog Box in the Hover State 289 290This example demonstrates how to set the layout area of a dialog box in hover mode on a foldable device. 291 292```ts 293@Entry 294@Component 295struct DatePickerDialogExample { 296 selectedDate: Date = new Date("2010-1-1"); 297 298 build() { 299 Column() { 300 Button("DatePickerDialog") 301 .margin(20) 302 .onClick(() => { 303 DatePickerDialog.show({ // You are advised to use this.getUIContext().showDatePickerDialog(). 304 start: new Date("2000-1-1"), 305 end: new Date("2100-12-31"), 306 selected: this.selectedDate, 307 showTime: true, 308 useMilitaryTime: false, 309 disappearTextStyle: { color: Color.Pink, font: { size: '22fp', weight: FontWeight.Bold }}, 310 textStyle: { color: '#ff00ff00', font: { size: '18fp', weight: FontWeight.Normal }}, 311 selectedTextStyle: { color: '#ff182431', font: { size: '14fp', weight: FontWeight.Regular }}, 312 onDateAccept: (value: Date) => { 313 // Use the setFullYear method to set the date when the OK button is touched. In this way, when the date picker dialog box is displayed again, the selected date is the date last confirmed. 314 this.selectedDate = value; 315 console.info("DatePickerDialog:onDateAccept()" + value.toString()); 316 }, 317 onCancel: () => { 318 console.info("DatePickerDialog:onCancel()"); 319 }, 320 onDateChange: (value: Date) => { 321 console.info("DatePickerDialog:onDateChange()" + value.toString()); 322 }, 323 onDidAppear: () => { 324 console.info("DatePickerDialog:onDidAppear()"); 325 }, 326 onDidDisappear: () => { 327 console.info("DatePickerDialog:onDidDisappear()"); 328 }, 329 onWillAppear: () => { 330 console.info("DatePickerDialog:onWillAppear()"); 331 }, 332 onWillDisappear: () => { 333 console.info("DatePickerDialog:onWillDisappear()"); 334 }, 335 enableHoverMode: true, 336 hoverModeArea: HoverModeAreaType.TOP_SCREEN 337 }) 338 }) 339 }.width('100%') 340 } 341} 342``` 343 344 345 346