1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, Callback, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, DateTimeOptions } from './common' 23import { ResourceColor, Offset, VoidCallback } from './units' 24import { DialogAlignment } from './alertDialog' 25import { CrownSensitivity } from './enums' 26/*** endif */ 27 28/** 29 * Defines the struct of DatePickerResult. 30 * 31 * @interface DatePickerResult 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @since 8 34 */ 35/** 36 * Defines the struct of DatePickerResult. 37 * 38 * @interface DatePickerResult 39 * @syscap SystemCapability.ArkUI.ArkUI.Full 40 * @crossplatform 41 * @since 10 42 */ 43/** 44 * Defines the struct of DatePickerResult. 45 * 46 * @interface DatePickerResult 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @crossplatform 49 * @atomicservice 50 * @since arkts {'1.1':'11','1.2':'20'} 51 * @arkts 1.1&1.2 52 */ 53declare interface DatePickerResult { 54 /** 55 * Application year 56 * 57 * @type { ?number } 58 * @syscap SystemCapability.ArkUI.ArkUI.Full 59 * @since 8 60 */ 61 /** 62 * Application year 63 * 64 * @type { ?number } 65 * @syscap SystemCapability.ArkUI.ArkUI.Full 66 * @crossplatform 67 * @since 10 68 */ 69 /** 70 * Year of the selected date. 71 * 72 * <p><strong>NOTE</strong>: 73 * <br>Value range: depends on start and end. 74 * If start and end are not set, the default range is [1970, 2100]. 75 * </p> 76 * 77 * @type { ?number } 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @atomicservice 81 * @since arkts {'1.1':'11','1.2':'20'} 82 * @arkts 1.1&1.2 83 */ 84 year?: number; 85 86 /** 87 * Application month 88 * 89 * @type { ?number } 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @since 8 92 */ 93 /** 94 * Application month 95 * 96 * @type { ?number } 97 * @syscap SystemCapability.ArkUI.ArkUI.Full 98 * @crossplatform 99 * @since 10 100 */ 101 /** 102 * Month index of the selected date. 103 * The index is zero-based. 0 indicates January, and 11 indicates December. 104 * 105 * <p><strong>NOTE</strong>: 106 * <br>Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. 107 * </p> 108 * 109 * @type { ?number } 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @crossplatform 112 * @atomicservice 113 * @since arkts {'1.1':'11','1.2':'20'} 114 * @arkts 1.1&1.2 115 */ 116 month?: number; 117 118 /** 119 * Application day 120 * 121 * @type { ?number } 122 * @syscap SystemCapability.ArkUI.ArkUI.Full 123 * @since 8 124 */ 125 /** 126 * Application day 127 * 128 * @type { ?number } 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133 /** 134 * Day of the selected date. 135 * 136 * <p><strong>NOTE</strong>: 137 * <br>Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. 138 * </p> 139 * 140 * @type { ?number } 141 * @syscap SystemCapability.ArkUI.ArkUI.Full 142 * @crossplatform 143 * @atomicservice 144 * @since arkts {'1.1':'11','1.2':'20'} 145 * @arkts 1.1&1.2 146 */ 147 day?: number; 148} 149 150/** 151 * Defines the mode of the date picker. 152 * 153 * @enum { number } 154 * @syscap SystemCapability.ArkUI.ArkUI.Full 155 * @crossplatform 156 * @atomicservice 157 * @since arkts {'1.1':'18','1.2':'20'} 158 * @arkts 1.1&1.2 159 */ 160declare enum DatePickerMode { 161 /** 162 * The date displays three columns: year, month, and day. 163 * 164 * @syscap SystemCapability.ArkUI.ArkUI.Full 165 * @crossplatform 166 * @atomicservice 167 * @since arkts {'1.1':'18','1.2':'20'} 168 * @arkts 1.1&1.2 169 */ 170 DATE = 0, 171 172 /** 173 * The date displays two columns: year and month. 174 * 175 * @syscap SystemCapability.ArkUI.ArkUI.Full 176 * @crossplatform 177 * @atomicservice 178 * @since arkts {'1.1':'18','1.2':'20'} 179 * @arkts 1.1&1.2 180 */ 181 YEAR_AND_MONTH = 1, 182 183 /** 184 * Defines a mode that displays the date in months and days of the month. 185 * In this mode, if the month changes from December to January, 186 * the year does not increment by one; if the month changes from January to December, 187 * the year does not decrement by one. The year remains fixed at the currently set value. 188 * 189 * @syscap SystemCapability.ArkUI.ArkUI.Full 190 * @crossplatform 191 * @atomicservice 192 * @since arkts {'1.1':'18','1.2':'20'} 193 * @arkts 1.1&1.2 194 */ 195 MONTH_AND_DAY = 2, 196} 197 198/** 199 * Defines the options of DatePicker. 200 * 201 * @interface DatePickerOptions 202 * @syscap SystemCapability.ArkUI.ArkUI.Full 203 * @since 8 204 */ 205/** 206 * Defines the options of DatePicker. 207 * 208 * @interface DatePickerOptions 209 * @syscap SystemCapability.ArkUI.ArkUI.Full 210 * @crossplatform 211 * @since 10 212 */ 213/** 214 * Parameters of the date picker. 215 * 216 * @interface DatePickerOptions 217 * @syscap SystemCapability.ArkUI.ArkUI.Full 218 * @crossplatform 219 * @atomicservice 220 * @since arkts {'1.1':'11','1.2':'20'} 221 * @arkts 1.1&1.2 222 */ 223declare interface DatePickerOptions { 224 /** 225 * Specifies the start date of the date selector. 226 * 227 * @type { ?Date } 228 * @syscap SystemCapability.ArkUI.ArkUI.Full 229 * @since 8 230 */ 231 /** 232 * Specifies the start date of the date selector. 233 * 234 * @type { ?Date } 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @crossplatform 237 * @since 10 238 */ 239 /** 240 * Start date of the picker. 241 * 242 * @type { ?Date } 243 * @default Date('1970-1-1') 244 * @syscap SystemCapability.ArkUI.ArkUI.Full 245 * @crossplatform 246 * @atomicservice 247 * @since arkts {'1.1':'11','1.2':'20'} 248 * @arkts 1.1&1.2 249 */ 250 start?: Date; 251 252 /** 253 * Specifies the end date for the date selector. 254 * 255 * @type { ?Date } 256 * @syscap SystemCapability.ArkUI.ArkUI.Full 257 * @since 8 258 */ 259 /** 260 * Specifies the end date for the date selector. 261 * 262 * @type { ?Date } 263 * @syscap SystemCapability.ArkUI.ArkUI.Full 264 * @crossplatform 265 * @since 10 266 */ 267 /** 268 * End date of the picker. 269 * 270 * @type { ?Date } 271 * @default Date('2100-12-31') 272 * @syscap SystemCapability.ArkUI.ArkUI.Full 273 * @crossplatform 274 * @atomicservice 275 * @since arkts {'1.1':'11','1.2':'20'} 276 * @arkts 1.1&1.2 277 */ 278 end?: Date; 279 280 /** 281 * Specifies the date selector check date or time selector check time. 282 * 283 * @type { ?Date } 284 * @syscap SystemCapability.ArkUI.ArkUI.Full 285 * @since 8 286 */ 287 /** 288 * Specifies the date selector check date or time selector check time. 289 * 290 * @type { ?Date } 291 * @syscap SystemCapability.ArkUI.ArkUI.Full 292 * @crossplatform 293 * @since 10 294 */ 295 /** 296 * Date of the selected item. 297 * 298 * @type { ?Date } 299 * @default current system date 300 * @syscap SystemCapability.ArkUI.ArkUI.Full 301 * @crossplatform 302 * @atomicservice 303 * @since arkts {'1.1':'11','1.2':'20'} 304 * @arkts 1.1&1.2 305 */ 306 selected?: Date; 307 308 /** 309 * Defines the mode of the date picker. 310 * 311 * @type { ?DatePickerMode } 312 * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. 313 * <br>Decimal values are rounded off. 314 * @syscap SystemCapability.ArkUI.ArkUI.Full 315 * @crossplatform 316 * @atomicservice 317 * @since arkts {'1.1':'18','1.2':'20'} 318 * @arkts 1.1&1.2 319 */ 320 mode?: DatePickerMode; 321} 322 323/** 324 * Defines the DatePicker Component. 325 * 326 * @interface DatePickerInterface 327 * @syscap SystemCapability.ArkUI.ArkUI.Full 328 * @since 8 329 */ 330/** 331 * Defines the DatePicker Component. 332 * 333 * @interface DatePickerInterface 334 * @syscap SystemCapability.ArkUI.ArkUI.Full 335 * @crossplatform 336 * @since 10 337 */ 338/** 339 * Creates a date picker in the given date range. 340 * 341 * @interface DatePickerInterface 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @crossplatform 344 * @atomicservice 345 * @since arkts {'1.1':'11','1.2':'20'} 346 * @arkts 1.1&1.2 347 */ 348interface DatePickerInterface { 349 /** 350 * Defines the DatePicker constructor. 351 * 352 * @param { DatePickerOptions } options 353 * @returns { DatePickerAttribute } 354 * @syscap SystemCapability.ArkUI.ArkUI.Full 355 * @since 8 356 */ 357 /** 358 * Defines the DatePicker constructor. 359 * 360 * @param { DatePickerOptions } options 361 * @returns { DatePickerAttribute } 362 * @syscap SystemCapability.ArkUI.ArkUI.Full 363 * @crossplatform 364 * @since 10 365 */ 366 /** 367 * Parameters of the date picker. 368 * 369 * @param { DatePickerOptions } options - Parameters of the date picker. 370 * @returns { DatePickerAttribute } 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @crossplatform 373 * @atomicservice 374 * @since arkts {'1.1':'11','1.2':'20'} 375 * @arkts 1.1&1.2 376 */ 377 (options?: DatePickerOptions): DatePickerAttribute; 378} 379 380/** 381 * Defines the DatePicker attribute functions. 382 * 383 * @extends CommonMethod 384 * @syscap SystemCapability.ArkUI.ArkUI.Full 385 * @since 8 386 */ 387/** 388 * Defines the DatePicker attribute functions. 389 * 390 * @extends CommonMethod 391 * @syscap SystemCapability.ArkUI.ArkUI.Full 392 * @crossplatform 393 * @since 10 394 */ 395/** 396 * Defines the DatePicker attribute functions. 397 * 398 * @extends CommonMethod<DatePickerAttribute> 399 * @syscap SystemCapability.ArkUI.ArkUI.Full 400 * @crossplatform 401 * @atomicservice 402 * @since arkts {'1.1':'11','1.2':'20'} 403 * @arkts 1.1&1.2 404 */ 405declare class DatePickerAttribute extends CommonMethod<DatePickerAttribute> { 406 /** 407 * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. 408 * 409 * @param { boolean } value 410 * @returns { DatePickerAttribute } 411 * @syscap SystemCapability.ArkUI.ArkUI.Full 412 * @since 8 413 */ 414 /** 415 * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. 416 * 417 * @param { boolean } value 418 * @returns { DatePickerAttribute } 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @since 10 422 */ 423 /** 424 * Specifies whether to display the lunar calendar. 425 * 426 * @param { boolean } value - Whether to display the lunar calendar. 427 * <br>- <em>true</em>: Display the lunar calendar. 428 * <br>- <em>false</em>: Do not display the lunar. 429 * @default false 430 * @returns { DatePickerAttribute } 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @crossplatform 433 * @atomicservice 434 * @since arkts {'1.1':'11','1.2':'20'} 435 * @arkts 1.1&1.2 436 */ 437 lunar(value: boolean): DatePickerAttribute; 438 439 /** 440 * Specifies whether to display the lunar calendar. 441 * This API supports the undefined type for the isLunar parameter. 442 * 443 * @param { Optional<boolean> } isLunar - Whether to display the lunar calendar. 444 * <br>- <em>true</em>: Display the lunar calendar. 445 * <br>- <em>false</em>: Do not display the lunar. 446 * @default false 447 * @returns { DatePickerAttribute } 448 * @syscap SystemCapability.ArkUI.ArkUI.Full 449 * @crossplatform 450 * @atomicservice 451 * @since arkts {'1.1':'18','1.2':'20'} 452 * @arkts 1.1&1.2 453 */ 454 lunar(isLunar: Optional<boolean>): DatePickerAttribute; 455 456 /** 457 * Sets the text style of disappearing items 458 * 459 * @param { PickerTextStyle } value - indicates the text style of disappearing items. 460 * @returns { DatePickerAttribute } 461 * @syscap SystemCapability.ArkUI.ArkUI.Full 462 * @crossplatform 463 * @since 10 464 */ 465 /** 466 * Sets the text style for the top and bottom items. 467 * 468 * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. 469 * @default {<br>color: '#ff182431',<br>font: {<br>size: '14fp', <br>weight: FontWeight.Regular<br>}<br>} 470 * @returns { DatePickerAttribute } 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @atomicservice 474 * @since arkts {'1.1':'11','1.2':'20'} 475 * @arkts 1.1&1.2 476 */ 477 disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; 478 479 /** 480 * Sets the text style for the top and bottom items. 481 * This API supports the undefined type for the style parameter. 482 * 483 * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of the top and bottom items. 484 * @default {<br>color: '#ff182431',<br>font: {<br>size: '14fp', <br>weight: FontWeight.Regular<br>}<br>} 485 * @returns { DatePickerAttribute } 486 * @syscap SystemCapability.ArkUI.ArkUI.Full 487 * @crossplatform 488 * @atomicservice 489 * @since arkts {'1.1':'18','1.2':'20'} 490 * @arkts 1.1&1.2 491 */ 492 disappearTextStyle(style: Optional<PickerTextStyle>): DatePickerAttribute; 493 494 /** 495 * Sets the text style of normal items 496 * 497 * @param { PickerTextStyle } value - indicates the text style of normal items. 498 * @returns { DatePickerAttribute } 499 * @syscap SystemCapability.ArkUI.ArkUI.Full 500 * @crossplatform 501 * @since 10 502 */ 503 /** 504 * Sets the text style for all items except the top, bottom, and selected items. 505 * 506 * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, 507 * <br>bottom, and selected items. 508 * @default {<br>color: '#ff182431',<br>font: {<br>size: '16fp', <br>weight: FontWeight.Regular<br>}<br>} 509 * @returns { DatePickerAttribute } 510 * @syscap SystemCapability.ArkUI.ArkUI.Full 511 * @crossplatform 512 * @atomicservice 513 * @since arkts {'1.1':'11','1.2':'20'} 514 * @arkts 1.1&1.2 515 */ 516 textStyle(value: PickerTextStyle): DatePickerAttribute; 517 518 /** 519 * Sets the text style for all items except the top, bottom, and selected items. 520 * This API supports the undefined type for the style parameter. 521 * 522 * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of all items except the top, 523 * <br>bottom, and selected items. 524 * @default {<br>color: '#ff182431',<br>font: {<br>size: '16fp', <br>weight: FontWeight.Regular<br>}<br>} 525 * @returns { DatePickerAttribute } 526 * @syscap SystemCapability.ArkUI.ArkUI.Full 527 * @crossplatform 528 * @atomicservice 529 * @since arkts {'1.1':'18','1.2':'20'} 530 * @arkts 1.1&1.2 531 */ 532 textStyle(style: Optional<PickerTextStyle>): DatePickerAttribute; 533 534 /** 535 * Sets the text style of selected items 536 * 537 * @param { PickerTextStyle } value - indicates the text style of selected items. 538 * @returns { DatePickerAttribute } 539 * @syscap SystemCapability.ArkUI.ArkUI.Full 540 * @crossplatform 541 * @since 10 542 */ 543 /** 544 * Sets the text style for the selected item. 545 * 546 * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. 547 * @default {<br>color: '#ff007dff',<br>font: {<br>size: '20fp', <br>weight: FontWeight.Medium<br>}<br>} 548 * @returns { DatePickerAttribute } 549 * @syscap SystemCapability.ArkUI.ArkUI.Full 550 * @crossplatform 551 * @atomicservice 552 * @since arkts {'1.1':'11','1.2':'20'} 553 * @arkts 1.1&1.2 554 */ 555 selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; 556 557 /** 558 * Sets the text style for the selected item. 559 * this API supports the undefined type for the style parameter. 560 * 561 * @param { Optional<PickerTextStyle> } style - Font color, font size, and font weight of the selected item. 562 * @default {<br>color: '#ff007dff',<br>font: {<br>size: '20fp', <br>weight: FontWeight.Medium<br>}<br>} 563 * @returns { DatePickerAttribute } 564 * @syscap SystemCapability.ArkUI.ArkUI.Full 565 * @crossplatform 566 * @atomicservice 567 * @since arkts {'1.1':'18','1.2':'20'} 568 * @arkts 1.1&1.2 569 */ 570 selectedTextStyle(style: Optional<PickerTextStyle>): DatePickerAttribute; 571 572 /** 573 * Triggered when a date is selected. 574 * 575 * @param { function } callback 576 * @returns { DatePickerAttribute } 577 * @syscap SystemCapability.ArkUI.ArkUI.Full 578 * @since 8 579 * @deprecated since 10 580 * @useinstead datePicker/DatePickerAttribute#onDateChange 581 */ 582 onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; 583 584 /** 585 * This event is triggered when a DatePicker date or time is selected. 586 * 587 * @param { function } callback 588 * @returns { DatePickerAttribute } 589 * @syscap SystemCapability.ArkUI.ArkUI.Full 590 * @crossplatform 591 * @since 10 592 */ 593 /** 594 * This event is triggered when a DatePicker date or time is selected. 595 * 596 * @param { function } callback 597 * @returns { DatePickerAttribute } 598 * @syscap SystemCapability.ArkUI.ArkUI.Full 599 * @crossplatform 600 * @atomicservice 601 * @since 11 602 */ 603 /** 604 * Triggered when a date is selected. 605 * Anonymous Object Rectification. 606 * 607 * @param { Callback<Date> } callback 608 * @returns { DatePickerAttribute } 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @atomicservice 612 * @since arkts {'1.1':'18','1.2':'20'} 613 * @arkts 1.1&1.2 614 */ 615 onDateChange(callback: Callback<Date>): DatePickerAttribute; 616 617 /** 618 * Triggered when a date is selected. 619 * 620 * @param { Optional<Callback<Date>> } callback 621 * @returns { DatePickerAttribute } 622 * @syscap SystemCapability.ArkUI.ArkUI.Full 623 * @crossplatform 624 * @atomicservice 625 * @since arkts {'1.1':'18','1.2':'20'} 626 * @arkts 1.1&1.2 627 */ 628 onDateChange(callback: Optional<Callback<Date>>): DatePickerAttribute; 629 630 /** 631 * Sets the sensitivity to the digital crown rotation. 632 * 633 * @param { Optional<CrownSensitivity> } sensitivity - Sensitivity to the digital crown rotation. 634 * @default CrownSensitivity.MEDIUM 635 * @returns { DatePickerAttribute } 636 * @syscap SystemCapability.ArkUI.ArkUI.Full 637 * @crossplatform 638 * @atomicservice 639 * @since arkts {'1.1':'18','1.2':'20'} 640 * @arkts 1.1&1.2 641 */ 642 digitalCrownSensitivity(sensitivity: Optional<CrownSensitivity>): DatePickerAttribute; 643 644 /** 645 * Sets whether to enable haptic feedback. 646 * 647 * @param { Optional<boolean> } enable - Whether to enable haptic feedback. 648 * <br>true (default): Haptic feedback is enabled. 649 * <br>false: Haptic feedback is disabled. 650 * @default true 651 * @returns { DatePickerAttribute } 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @atomicservice 654 * @since arkts {'1.1':'18','1.2':'20'} 655 * @arkts 1.1&1.2 656 */ 657 enableHapticFeedback(enable: Optional<boolean>): DatePickerAttribute; 658 659/** 660 * Can scroll loop if true is set, on the contrary it can not. 661 * 662 * @param { Optional<boolean> } isLoop 663 * @returns { DatePickerAttribute } 664 * @syscap SystemCapability.ArkUI.ArkUI.Full 665 * @crossplatform 666 * @atomicservice 667 * @since 20 668 */ 669 canLoop(isLoop: Optional<boolean>): DatePickerAttribute; 670} 671 672/** 673 * Defines the style of the lunar calendar switch in the DatePickerDialog component. 674 * 675 * @interface LunarSwitchStyle 676 * @syscap SystemCapability.ArkUI.ArkUI.Full 677 * @crossplatform 678 * @atomicservice 679 * @since arkts {'1.1':'14','1.2':'20'} 680 * @arkts 1.1&1.2 681 */ 682declare interface LunarSwitchStyle { 683 /** 684 * Background color of the switch when it is on. 685 * 686 * @type { ?ResourceColor } 687 * @default $r('sys.color.ohos_id_color_text_primary_actived') 688 * @syscap SystemCapability.ArkUI.ArkUI.Full 689 * @crossplatform 690 * @atomicservice 691 * @since arkts {'1.1':'14','1.2':'20'} 692 * @arkts 1.1&1.2 693 */ 694 selectedColor?: ResourceColor; 695 696 /** 697 * Border color of the switch when it is off. 698 * 699 * @type { ?ResourceColor } 700 * @default $r('sys.color.ohos_id_color_switch_outline_off') 701 * @syscap SystemCapability.ArkUI.ArkUI.Full 702 * @crossplatform 703 * @atomicservice 704 * @since arkts {'1.1':'14','1.2':'20'} 705 * @arkts 1.1&1.2 706 */ 707 unselectedColor?: ResourceColor; 708 709 /** 710 * Color of the icon inside the switch. 711 * 712 * @type { ?ResourceColor } 713 * @default Color.White 714 * @syscap SystemCapability.ArkUI.ArkUI.Full 715 * @crossplatform 716 * @atomicservice 717 * @since arkts {'1.1':'14','1.2':'20'} 718 * @arkts 1.1&1.2 719 */ 720 strokeColor?: ResourceColor; 721} 722 723/** 724 * Defines the DatePickerDialogOptions for Data Picker Dialog. 725 * 726 * @extends DatePickerOptions 727 * @interface DatePickerDialogOptions 728 * @syscap SystemCapability.ArkUI.ArkUI.Full 729 * @since 8 730 */ 731/** 732 * Defines the DatePickerDialogOptions for Data Picker Dialog. 733 * 734 * @extends DatePickerOptions 735 * @interface DatePickerDialogOptions 736 * @syscap SystemCapability.ArkUI.ArkUI.Full 737 * @crossplatform 738 * @since 10 739 */ 740/** 741 * Parameters of the date picker dialog box. 742 * 743 * @extends DatePickerOptions 744 * @interface DatePickerDialogOptions 745 * @syscap SystemCapability.ArkUI.ArkUI.Full 746 * @crossplatform 747 * @atomicservice 748 * @since arkts {'1.1':'11','1.2':'20'} 749 * @arkts 1.1&1.2 750 */ 751declare interface DatePickerDialogOptions extends DatePickerOptions { 752 /** 753 * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. 754 * 755 * @type { ?boolean } 756 * @syscap SystemCapability.ArkUI.ArkUI.Full 757 * @since 8 758 */ 759 /** 760 * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. 761 * 762 * @type { ?boolean } 763 * @syscap SystemCapability.ArkUI.ArkUI.Full 764 * @crossplatform 765 * @since 10 766 */ 767 /** 768 * Whether to display the lunar calendar. 769 * The value true means to display the lunar calendar, and false means the opposite. 770 * 771 * @type { ?boolean } 772 * @default false 773 * @syscap SystemCapability.ArkUI.ArkUI.Full 774 * @crossplatform 775 * @atomicservice 776 * @since arkts {'1.1':'11','1.2':'20'} 777 * @arkts 1.1&1.2 778 */ 779 lunar?: boolean; 780 781 /** 782 * Whether to show the switch to display the lunar. 783 * 784 * @type { ?boolean } value - indicates whether to show the switch to display the lunar. 785 * @syscap SystemCapability.ArkUI.ArkUI.Full 786 * @crossplatform 787 * @since 10 788 */ 789 /** 790 * Whether to display the lunar calendar switch. 791 * The value true means to display the lunar calendar switch, and false means the opposite. 792 * 793 * @type { ?boolean } value - indicates whether to show the switch to display the lunar. 794 * @default false 795 * @syscap SystemCapability.ArkUI.ArkUI.Full 796 * @crossplatform 797 * @atomicservice 798 * @since arkts {'1.1':'11','1.2':'20'} 799 * @arkts 1.1&1.2 800 */ 801 lunarSwitch?: boolean; 802 803 /** 804 * Style of the lunar calendar switch. 805 * 806 * @type { ?LunarSwitchStyle } 807 * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), 808 * unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. 809 * @syscap SystemCapability.ArkUI.ArkUI.Full 810 * @crossplatform 811 * @atomicservice 812 * @since arkts {'1.1':'14','1.2':'20'} 813 * @arkts 1.1&1.2 814 */ 815 lunarSwitchStyle?: LunarSwitchStyle; 816 817 /** 818 * Indicates whether to show the time selector. 819 * 820 * @type { ?boolean } 821 * @syscap SystemCapability.ArkUI.ArkUI.Full 822 * @crossplatform 823 * @since 10 824 */ 825 /** 826 * Whether to display the time item. 827 * The value true means to display the time item, and false means the opposite. 828 * 829 * <p><strong>NOTE</strong>: 830 * <br>With showTime=true, the mode parameter has no effect and the default three columns for year, 831 * <br>month, and day are displayed. 832 * </p> 833 * 834 * @type { ?boolean } 835 * @default false 836 * @syscap SystemCapability.ArkUI.ArkUI.Full 837 * @crossplatform 838 * @atomicservice 839 * @since arkts {'1.1':'11','1.2':'20'} 840 * @arkts 1.1&1.2 841 */ 842 showTime?: boolean; 843 844 /** 845 * Indicates whether to display the 24-hour clock. 846 * 847 * @type { ?boolean } 848 * @syscap SystemCapability.ArkUI.ArkUI.Full 849 * @crossplatform 850 * @since 10 851 */ 852 /** 853 * Whether to display time in 24-hour format. 854 * The value true means to display time in 24-hour format, and false means the opposite. 855 * 856 * <p><strong>NOTE</strong>: 857 * <br>When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. 858 * </p> 859 * 860 * @type { ?boolean } 861 * @default false 862 * @syscap SystemCapability.ArkUI.ArkUI.Full 863 * @crossplatform 864 * @atomicservice 865 * @since arkts {'1.1':'11','1.2':'20'} 866 * @arkts 1.1&1.2 867 */ 868 useMilitaryTime?: boolean; 869 870 /** 871 * Text style of disappearing items 872 * 873 * @type { ?PickerTextStyle } 874 * @syscap SystemCapability.ArkUI.ArkUI.Full 875 * @crossplatform 876 * @since 10 877 */ 878 /** 879 * Font color, font size, and font width for the top and bottom items. 880 * 881 * @type { ?PickerTextStyle } 882 * @default {<br>color: '#ff182431',<br>font: {<br>size: '14fp', <br>weight: FontWeight.Regular<br>}<br>} 883 * @syscap SystemCapability.ArkUI.ArkUI.Full 884 * @crossplatform 885 * @atomicservice 886 * @since arkts {'1.1':'11','1.2':'20'} 887 * @arkts 1.1&1.2 888 */ 889 disappearTextStyle?: PickerTextStyle; 890 891 /** 892 * Text style of normal items 893 * 894 * @type { ?PickerTextStyle } 895 * @syscap SystemCapability.ArkUI.ArkUI.Full 896 * @crossplatform 897 * @since 10 898 */ 899 /** 900 * Font color, font size, and font width of all items except the top, bottom, and selected items. 901 * 902 * @type { ?PickerTextStyle } 903 * @default {<br>color: '#ff182431',<br>font: {<br>size: '16fp', <br>weight: FontWeight.Regular<br>}<br>} 904 * @syscap SystemCapability.ArkUI.ArkUI.Full 905 * @crossplatform 906 * @atomicservice 907 * @since arkts {'1.1':'11','1.2':'20'} 908 * @arkts 1.1&1.2 909 */ 910 textStyle?: PickerTextStyle; 911 912 /** 913 * Style of accept button. 914 * 915 * <p><strong>NOTE</strong>: 916 * <br>In the acceptButtonStyle and cancelButtonStyle configurations, 917 * <br>only one primary field can be set to true at most. 918 * <br>If both the primary fields are set to true, neither will take effect. 919 * </p> 920 * 921 * @type { ?PickerDialogButtonStyle } 922 * @syscap SystemCapability.ArkUI.ArkUI.Full 923 * @crossplatform 924 * @atomicservice 925 * @since arkts {'1.1':'12','1.2':'20'} 926 * @arkts 1.1&1.2 927 */ 928 acceptButtonStyle?: PickerDialogButtonStyle; 929 930 /** 931 * Style of cancel button. 932 * 933 * <p><strong>NOTE</strong>: 934 * <br>In the acceptButtonStyle and cancelButtonStyle configurations, 935 * <br>only one primary field can be set to true at most. 936 * <br>If both the primary fields are set to true, neither will take effect. 937 * </p> 938 * 939 * @type { ?PickerDialogButtonStyle } 940 * @syscap SystemCapability.ArkUI.ArkUI.Full 941 * @crossplatform 942 * @atomicservice 943 * @since arkts {'1.1':'12','1.2':'20'} 944 * @arkts 1.1&1.2 945 */ 946 cancelButtonStyle?: PickerDialogButtonStyle; 947 948 /** 949 * Font color, font size, and font width of the selected item. 950 * 951 * @type { ?PickerTextStyle } 952 * @syscap SystemCapability.ArkUI.ArkUI.Full 953 * @crossplatform 954 * @since 10 955 */ 956 /** 957 * Font color, font size, and font width of the selected item. 958 * 959 * @type { ?PickerTextStyle } 960 * @default { color: '#ff007dff', font: { size: '20fp', weight: FontWeight.Medium } } 961 * @syscap SystemCapability.ArkUI.ArkUI.Full 962 * @crossplatform 963 * @atomicservice 964 * @since arkts {'1.1':'11','1.2':'20'} 965 * @arkts 1.1&1.2 966 */ 967 selectedTextStyle?: PickerTextStyle; 968 969 /** 970 * Mask Region of dialog. The size cannot exceed the main window. 971 * 972 * @type { ?Rectangle } 973 * @syscap SystemCapability.ArkUI.ArkUI.Full 974 * @crossplatform 975 * @since 10 976 */ 977 /** 978 * Mask area of the dialog box. 979 * Events outside the mask area are transparently transmitted, and events within the mask area are not. 980 * 981 * @type { ?Rectangle } 982 * @default { x: 0, y: 0, width: '100%', height: '100%' } 983 * @syscap SystemCapability.ArkUI.ArkUI.Full 984 * @crossplatform 985 * @atomicservice 986 * @since arkts {'1.1':'11','1.2':'20'} 987 * @arkts 1.1&1.2 988 */ 989 maskRect?: Rectangle; 990 991 /** 992 * Defines the dialog alignment of the screen. 993 * 994 * @type { ?DialogAlignment } 995 * @syscap SystemCapability.ArkUI.ArkUI.Full 996 * @crossplatform 997 * @since 10 998 */ 999 /** 1000 * Alignment mode of the dialog box in the vertical direction. 1001 * 1002 * @type { ?DialogAlignment } 1003 * @default DialogAlignment.Default 1004 * @syscap SystemCapability.ArkUI.ArkUI.Full 1005 * @crossplatform 1006 * @atomicservice 1007 * @since arkts {'1.1':'11','1.2':'20'} 1008 * @arkts 1.1&1.2 1009 */ 1010 alignment?: DialogAlignment; 1011 1012 /** 1013 * Defines the dialog offset. 1014 * 1015 * @type { ?Offset } 1016 * @syscap SystemCapability.ArkUI.ArkUI.Full 1017 * @crossplatform 1018 * @since 10 1019 */ 1020 /** 1021 * Offset of the dialog box based on the alignment settings. 1022 * 1023 * @type { ?Offset } 1024 * @default { dx: 0 , dy: 0 } 1025 * @syscap SystemCapability.ArkUI.ArkUI.Full 1026 * @crossplatform 1027 * @atomicservice 1028 * @since arkts {'1.1':'11','1.2':'20'} 1029 * @arkts 1.1&1.2 1030 */ 1031 offset?: Offset; 1032 1033 /** 1034 * Callback invoked when the OK button in the dialog box is clicked. 1035 * 1036 * @type { ?function } 1037 * @syscap SystemCapability.ArkUI.ArkUI.Full 1038 * @since 8 1039 * @deprecated since 10 1040 * @useinstead datePicker/DatePickerDialogOptions#onDateAccept 1041 */ 1042 onAccept?: (value: DatePickerResult) => void; 1043 1044 /** 1045 * Called when the Cancel button in the dialog is clicked. 1046 * 1047 * @type { ?function } 1048 * @syscap SystemCapability.ArkUI.ArkUI.Full 1049 * @since 8 1050 */ 1051 /** 1052 * Called when the Cancel button in the dialog is clicked. 1053 * 1054 * @type { ?function } 1055 * @syscap SystemCapability.ArkUI.ArkUI.Full 1056 * @crossplatform 1057 * @since 10 1058 */ 1059 /** 1060 * Called when the Cancel button in the dialog is clicked. 1061 * 1062 * @type { ?function } 1063 * @syscap SystemCapability.ArkUI.ArkUI.Full 1064 * @crossplatform 1065 * @atomicservice 1066 * @since 11 1067 */ 1068 /** 1069 * Callback invoked when the Cancel button in the dialog box is clicked. 1070 * Anonymous Object Rectification. 1071 * 1072 * @type { ?VoidCallback } 1073 * @syscap SystemCapability.ArkUI.ArkUI.Full 1074 * @crossplatform 1075 * @atomicservice 1076 * @since arkts {'1.1':'18','1.2':'20'} 1077 * @arkts 1.1&1.2 1078 */ 1079 onCancel?: VoidCallback; 1080 1081 /** 1082 * Callback invoked when the selected item in the picker changes. 1083 * 1084 * @type { ?function } 1085 * @syscap SystemCapability.ArkUI.ArkUI.Full 1086 * @since 8 1087 * @deprecated since 10 1088 * @useinstead datePicker/DatePickerDialogOptions#onDateChange 1089 */ 1090 onChange?: (value: DatePickerResult) => void; 1091 1092 /** 1093 * Called when the OK button in the dialog is clicked. 1094 * 1095 * @type { ?function } 1096 * @syscap SystemCapability.ArkUI.ArkUI.Full 1097 * @crossplatform 1098 * @since 10 1099 */ 1100 /** 1101 * Called when the OK button in the dialog is clicked. 1102 * 1103 * @type { ?function } 1104 * @syscap SystemCapability.ArkUI.ArkUI.Full 1105 * @crossplatform 1106 * @atomicservice 1107 * @since 11 1108 */ 1109 /** 1110 * Callback invoked when the OK button in the dialog box is clicked. 1111 * 1112 * <p><strong>NOTE</strong>: 1113 * <br>When showTime is set to true, the hour and minute in the value returned by 1114 * <br>the callback are the hour and minute selected in the picker. Otherwise, 1115 * <br>the hour and minute are the hour and minute of the system time. 1116 * </p> 1117 * 1118 * @type { ?Callback<Date> } 1119 * @syscap SystemCapability.ArkUI.ArkUI.Full 1120 * @crossplatform 1121 * @atomicservice 1122 * @since arkts {'1.1':'18','1.2':'20'} 1123 * @arkts 1.1&1.2 1124 */ 1125 onDateAccept?: Callback<Date>; 1126 1127 /** 1128 * This event is triggered when a DatePicker date or time is selected in dialog. 1129 * 1130 * @type { ?function } 1131 * @syscap SystemCapability.ArkUI.ArkUI.Full 1132 * @crossplatform 1133 * @since 10 1134 */ 1135 /** 1136 * Callback invoked when the selected item in the picker changes. 1137 * 1138 * @type { ?function } 1139 * @syscap SystemCapability.ArkUI.ArkUI.Full 1140 * @crossplatform 1141 * @atomicservice 1142 * @since 11 1143 */ 1144 /** 1145 * Callback invoked when the selected item in the picker changes. 1146 * Anonymous Object Rectification. 1147 * 1148 * <p><strong>NOTE</strong>: 1149 * <br>When showTime is set to true, the hour and minute in the value returned by 1150 * <br>the callback are the hour and minute selected in the picker. Otherwise, 1151 * <br>the hour and minute are the hour and minute of the system time. 1152 * </p> 1153 * 1154 * @type { ?Callback<Date> } 1155 * @syscap SystemCapability.ArkUI.ArkUI.Full 1156 * @crossplatform 1157 * @atomicservice 1158 * @since arkts {'1.1':'18','1.2':'20'} 1159 * @arkts 1.1&1.2 1160 */ 1161 onDateChange?: Callback<Date>; 1162 1163 /** 1164 * Defines the datePickerDialog's background color 1165 * 1166 * @type { ?ResourceColor } 1167 * @default Color.Transparent 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @crossplatform 1170 * @since 11 1171 */ 1172 /** 1173 * Backplane color of the dialog box. 1174 * 1175 * @type { ?ResourceColor } 1176 * @default Color.Transparent 1177 * @syscap SystemCapability.ArkUI.ArkUI.Full 1178 * @crossplatform 1179 * @atomicservice 1180 * @since arkts {'1.1':'12','1.2':'20'} 1181 * @arkts 1.1&1.2 1182 */ 1183 backgroundColor?: ResourceColor; 1184 1185 /** 1186 * Defines the datePickerDialog's background blur Style 1187 * 1188 * @type { ?BlurStyle } 1189 * @default BlurStyle.COMPONENT_ULTRA_THICK 1190 * @syscap SystemCapability.ArkUI.ArkUI.Full 1191 * @crossplatform 1192 * @since 11 1193 */ 1194 /** 1195 * Background blur style of the dialog box. 1196 * 1197 * @type { ?BlurStyle } 1198 * @default BlurStyle.COMPONENT_ULTRA_THICK 1199 * @syscap SystemCapability.ArkUI.ArkUI.Full 1200 * @crossplatform 1201 * @atomicservice 1202 * @since arkts {'1.1':'12','1.2':'20'} 1203 * @arkts 1.1&1.2 1204 */ 1205 backgroundBlurStyle?: BlurStyle; 1206 1207 /** 1208 * Options for customizing the background blur style. 1209 * 1210 * @type { ?BackgroundBlurStyleOptions } 1211 * @syscap SystemCapability.ArkUI.ArkUI.Full 1212 * @crossplatform 1213 * @atomicservice 1214 * @since arkts {'1.1':'19','1.2':'20'} 1215 * @arkts 1.1&1.2 1216 */ 1217 backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; 1218 1219 /** 1220 * Options for customizing the background effect. 1221 * 1222 * @type { ?BackgroundEffectOptions } 1223 * @syscap SystemCapability.ArkUI.ArkUI.Full 1224 * @crossplatform 1225 * @atomicservice 1226 * @since arkts {'1.1':'19','1.2':'20'} 1227 * @arkts 1.1&1.2 1228 */ 1229 backgroundEffect?: BackgroundEffectOptions; 1230 1231 /** 1232 * Event callback when the dialog box appears. 1233 * 1234 * @type { ?function } 1235 * @syscap SystemCapability.ArkUI.ArkUI.Full 1236 * @crossplatform 1237 * @atomicservice 1238 * @since 12 1239 */ 1240 /** 1241 * Event callback when the dialog box appears. 1242 * 1243 * <p><strong>NOTE</strong>: 1244 * <br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > 1245 * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. 1246 * <br>2. You can set the callback event for changing the dialog box display effect in onDidAppear. 1247 * The settings take effect next time the dialog box appears. 1248 * <br>3. If the user closes the dialog box immediately after it appears, 1249 * onWillDisappear is invoked before onDidAppear. 1250 * <br>4. If the dialog box is closed before its entrance animation is finished, 1251 * this callback is not invoked. 1252 * </p> 1253 * 1254 * @type { ?VoidCallback } 1255 * @syscap SystemCapability.ArkUI.ArkUI.Full 1256 * @crossplatform 1257 * @atomicservice 1258 * @since arkts {'1.1':'18','1.2':'20'} 1259 * @arkts 1.1&1.2 1260 */ 1261 onDidAppear?: VoidCallback; 1262 1263 /** 1264 * Callback function when the dialog disappears. 1265 * 1266 * @type { ?function } 1267 * @syscap SystemCapability.ArkUI.ArkUI.Full 1268 * @crossplatform 1269 * @atomicservice 1270 * @since 12 1271 */ 1272 /** 1273 * Event callback when the dialog box disappears. 1274 * 1275 * <p><strong>NOTE</strong>: 1276 * <br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > 1277 * <br>(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. 1278 * </p> 1279 * 1280 * @type { ?VoidCallback } 1281 * @syscap SystemCapability.ArkUI.ArkUI.Full 1282 * @crossplatform 1283 * @atomicservice 1284 * @since arkts {'1.1':'18','1.2':'20'} 1285 * @arkts 1.1&1.2 1286 */ 1287 onDidDisappear?: VoidCallback; 1288 1289 /** 1290 * Callback function before the dialog openAnimation starts. 1291 * 1292 * @type { ?function } 1293 * @syscap SystemCapability.ArkUI.ArkUI.Full 1294 * @crossplatform 1295 * @atomicservice 1296 * @since 12 1297 */ 1298 /** 1299 * Event callback when the dialog box is about to appear. 1300 * 1301 * <p><strong>NOTE</strong>: 1302 * <br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > 1303 * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. 1304 * <br>2. You can set the callback event for changing the dialog box display effect in onWillAppear. 1305 * The settings take effect next time the dialog box appears. 1306 * </p> 1307 * 1308 * @type { ?VoidCallback } 1309 * @syscap SystemCapability.ArkUI.ArkUI.Full 1310 * @crossplatform 1311 * @atomicservice 1312 * @since arkts {'1.1':'18','1.2':'20'} 1313 * @arkts 1.1&1.2 1314 */ 1315 onWillAppear?: VoidCallback; 1316 1317 /** 1318 * Callback function before the dialog closeAnimation starts. 1319 * 1320 * @type { ?function } 1321 * @syscap SystemCapability.ArkUI.ArkUI.Full 1322 * @crossplatform 1323 * @atomicservice 1324 * @since 12 1325 */ 1326 /** 1327 * Event callback when the dialog box is about to disappear. 1328 * 1329 * <p><strong>NOTE</strong>: 1330 * <br>1. The normal timing sequence is as follows: onWillAppear > onDidAppear > 1331 * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. 1332 * <br>2. If the user closes the dialog box immediately after it appears, 1333 * onWillDisappear is invoked before onDidAppear. 1334 * </p> 1335 * 1336 * @type { ?VoidCallback } 1337 * @syscap SystemCapability.ArkUI.ArkUI.Full 1338 * @crossplatform 1339 * @atomicservice 1340 * @since arkts {'1.1':'18','1.2':'20'} 1341 * @arkts 1.1&1.2 1342 */ 1343 onWillDisappear?: VoidCallback; 1344 1345 /** 1346 * Shadow of the dialog box. 1347 * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD 1348 * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM 1349 * 1350 * @type { ?(ShadowOptions | ShadowStyle) } 1351 * @syscap SystemCapability.ArkUI.ArkUI.Full 1352 * @crossplatform 1353 * @atomicservice 1354 * @since arkts {'1.1':'12','1.2':'20'} 1355 * @arkts 1.1&1.2 1356 */ 1357 shadow?: ShadowOptions | ShadowStyle; 1358 1359 /** 1360 * Whether to display a leading zero for the hours and minutes. 1361 * 1362 * <p><strong>NOTE</strong>: 1363 * <br>Currently only the configuration of the hour and minute parameters is supported. 1364 * </p> 1365 * 1366 * @type { ?DateTimeOptions } 1367 * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; 1368 * <br>In the 12-hour format, it defaults to numeric, which means no leading zero is used. 1369 * <br>minute: defaults to 2-digit, which means a leading zero is used. 1370 * @syscap SystemCapability.ArkUI.ArkUI.Full 1371 * @crossplatform 1372 * @atomicservice 1373 * @since arkts {'1.1':'12','1.2':'20'} 1374 * @arkts 1.1&1.2 1375 */ 1376 dateTimeOptions?: DateTimeOptions; 1377 1378 /** 1379 * Whether to enable the hover mode. 1380 * 1381 * @type { ?boolean } 1382 * @default false - meaning not to enable the hover mode. 1383 * @syscap SystemCapability.ArkUI.ArkUI.Full 1384 * @crossplatform 1385 * @atomicservice 1386 * @since arkts {'1.1':'14','1.2':'20'} 1387 * @arkts 1.1&1.2 1388 */ 1389 enableHoverMode?: boolean; 1390 1391 /** 1392 * Display area of the dialog box in hover mode. 1393 * 1394 * @type { ?HoverModeAreaType } 1395 * @default HoverModeAreaType.BOTTOM_SCREEN 1396 * @syscap SystemCapability.ArkUI.ArkUI.Full 1397 * @crossplatform 1398 * @atomicservice 1399 * @since arkts {'1.1':'14','1.2':'20'} 1400 * @arkts 1.1&1.2 1401 */ 1402 hoverModeArea?: HoverModeAreaType; 1403 1404 /** 1405 * Whether to enable haptic feedback. 1406 * The value true means to enable haptic feedback, and false means the opposite 1407 * 1408 * @type { ?boolean } 1409 * @default true 1410 * @syscap SystemCapability.ArkUI.ArkUI.Full 1411 * @atomicservice 1412 * @since arkts {'1.1':'18','1.2':'20'} 1413 * @arkts 1.1&1.2 1414 */ 1415 enableHapticFeedback?: boolean; 1416 1417 /** 1418 * Can scroll loop if true is set, on the contrary it can not. 1419 * 1420 * @type { ?boolean } 1421 * @default true 1422 * @syscap SystemCapability.ArkUI.ArkUI.Full 1423 * @crossplatform 1424 * @atomicservice 1425 * @since 20 1426 */ 1427 canLoop?: boolean; 1428} 1429 1430/** 1431 * Defines DatePickerDialog which uses show method to show DatePicker dialog. 1432 * 1433 * @syscap SystemCapability.ArkUI.ArkUI.Full 1434 * @since 8 1435 */ 1436/** 1437 * Defines DatePickerDialog which uses show method to show DatePicker dialog. 1438 * 1439 * @syscap SystemCapability.ArkUI.ArkUI.Full 1440 * @crossplatform 1441 * @since 10 1442 */ 1443/** 1444 * Defines DatePickerDialog which uses show method to show DatePicker dialog. 1445 * 1446 * @syscap SystemCapability.ArkUI.ArkUI.Full 1447 * @crossplatform 1448 * @atomicservice 1449 * @since arkts {'1.1':'11','1.2':'20'} 1450 * @arkts 1.1&1.2 1451 */ 1452declare class DatePickerDialog { 1453 /** 1454 * Invoking method display. 1455 * 1456 * @param { DatePickerDialogOptions } options 1457 * @syscap SystemCapability.ArkUI.ArkUI.Full 1458 * @since 8 1459 */ 1460 /** 1461 * Invoking method display. 1462 * 1463 * @param { DatePickerDialogOptions } options 1464 * @syscap SystemCapability.ArkUI.ArkUI.Full 1465 * @crossplatform 1466 * @since 10 1467 */ 1468 /** 1469 * Shows a date picker dialog box. 1470 * 1471 * @param { DatePickerDialogOptions } options - Parameters of the date picker dialog box. 1472 * @syscap SystemCapability.ArkUI.ArkUI.Full 1473 * @crossplatform 1474 * @atomicservice 1475 * @since 11 1476 * @deprecated since 18 1477 * @useinstead ohos.arkui.UIContext.UIContext#showDatePickerDialog 1478 */ 1479 static show(options?: DatePickerDialogOptions); 1480} 1481 1482/** 1483 * Defines DatePicker Component. 1484 * 1485 * @syscap SystemCapability.ArkUI.ArkUI.Full 1486 * @since 8 1487 */ 1488/** 1489 * Defines DatePicker Component. 1490 * 1491 * @syscap SystemCapability.ArkUI.ArkUI.Full 1492 * @crossplatform 1493 * @since 10 1494 */ 1495/** 1496 * Defines DatePicker Component. 1497 * 1498 * @syscap SystemCapability.ArkUI.ArkUI.Full 1499 * @crossplatform 1500 * @atomicservice 1501 * @since 11 1502 */ 1503declare const DatePicker: DatePickerInterface; 1504 1505/** 1506 * Defines DatePicker Component instance. 1507 * 1508 * @syscap SystemCapability.ArkUI.ArkUI.Full 1509 * @since 8 1510 */ 1511/** 1512 * Defines DatePicker Component instance. 1513 * 1514 * @syscap SystemCapability.ArkUI.ArkUI.Full 1515 * @crossplatform 1516 * @since 10 1517 */ 1518/** 1519 * Defines DatePicker Component instance. 1520 * 1521 * @syscap SystemCapability.ArkUI.ArkUI.Full 1522 * @crossplatform 1523 * @atomicservice 1524 * @since 11 1525 */ 1526declare const DatePickerInstance: DatePickerAttribute; 1527 1528 1529