UNPKG

2.02 kBTypeScriptView Raw
1import { View } from '../core/view';
2import { Property } from '../core/properties';
3
4export const yearProperty: Property<DatePicker, number>;
5export const monthProperty: Property<DatePicker, number>;
6export const dayProperty: Property<DatePicker, number>;
7export const dateProperty: Property<DatePicker, Date>;
8export const maxDate: Property<DatePicker, Date>;
9export const minDate: Property<DatePicker, Date>;
10export const iosPreferredDatePickerStyleProperty: Property<DatePicker, number>;
11
12/**
13 * Represents an date picker.
14 */
15export class DatePicker extends View {
16 /**
17 * Gets the native [android.widget.DatePicker](http://developer.android.com/reference/android/widget/DatePicker.html) that represents the user interface for this component. Valid only when running on Android OS.
18 */
19 android: any /* android.widget.DatePicker */;
20
21 /**
22 * Gets the native iOS [UIDatePicker](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
23 */
24 ios: any /* UIDatePicker */;
25
26 /**
27 * Gets or sets the year.
28 */
29 year: number;
30
31 /**
32 * Gets or sets the month. The months start from 1.
33 */
34 month: number;
35
36 /**
37 * Gets or sets the day. The days start from 1.
38 */
39 day: number;
40
41 /**
42 * Gets or sets the entire date.
43 */
44 date: Date;
45
46 /**
47 * Gets or sets the max date.
48 */
49 maxDate: Date;
50
51 /**
52 * Gets or sets the min date.
53 */
54 minDate: Date;
55
56 /**
57 * Gets or set the UIDatePickerStyle of the date picker in iOS 13.4+. Defaults to 0.
58 * Valid values are numbers:
59 * - 0: automatic (system picks the concrete style based on the current platform and date picker mode)
60 * - 1: wheels (the date picker displays as a wheel picker)
61 * - 2: compact (the date picker displays as a label that when tapped displays a calendar-style editor)
62 * - 3: inline (the date pickers displays as an inline, editable field)
63 */
64 iosPreferredDatePickerStyle: number;
65}