You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/datetimepicker.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,52 @@ You can use css to style the `DatePickerField` and the `TimePickerField`. The fi
128
128
129
129
Here's the css used to achieve the above result, as used in the [demo](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo/app/home/home-page.css#L22), [demo-angular](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-angular/src/app/home/home.component.css#L22) and [demo-vue](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-vue/app/components/Home.vue#L350) applications.
130
130
131
+
To apply styles at runtime when opening the DateTimePicker you can do the following:
132
+
133
+
```ts
134
+
import { DateTimePicker, DateTimePickerStyle } from '@nativescript/datetimepicker';
135
+
import { Application, Button } from '@nativescript/core';
136
+
137
+
export function someButtonTapToOpenThePicker(args) {
138
+
const dateTimePickerStyle = DateTimePickerStyle.create(args.object as any);
139
+
140
+
// This example handles styling the calendar for light and dark mode of the device settings
141
+
if (Application.systemAppearance() === 'dark') {
142
+
// style for dark mode
143
+
dateTimePickerStyle.buttonsBackgroundColor = new Color('#202125');
144
+
dateTimePickerStyle.dialogBackgroundColor = new Color('#202125');
145
+
dateTimePickerStyle.titleTextColor = new Color('#fff');
146
+
dateTimePickerStyle.buttonsTextColor = new Color('#0067a6');
147
+
dateTimePickerStyle.spinnersBackgroundColor = new Color('#202125');
148
+
dateTimePickerStyle.spinnersTextColor = new Color('#fff');
149
+
} else {
150
+
// style for light mode
151
+
dateTimePickerStyle.buttonsBackgroundColor = new Color('#fff');
152
+
dateTimePickerStyle.dialogBackgroundColor = new Color('#fff');
153
+
dateTimePickerStyle.titleTextColor = new Color('#0067a6');
154
+
dateTimePickerStyle.buttonsTextColor = new Color('#0067a6');
155
+
dateTimePickerStyle.spinnersBackgroundColor = new Color('#fff');
156
+
dateTimePickerStyle.spinnersTextColor = new Color('#0067a6');
157
+
}
158
+
159
+
DateTimePicker.pickDate(
160
+
{
161
+
context: (args.object as Button)._context,
162
+
date: yourDateValue
163
+
minDate: subYears(new Date(), 10),
164
+
maxDate: new Date(),
165
+
title: 'DatePicker'
166
+
okButtonText: 'Okay',
167
+
cancelButtonText: 'Cancel',
168
+
locale: 'en'
169
+
},
170
+
dateTimePickerStyle
171
+
).then((result) => {
172
+
// handle the result
173
+
})
174
+
}
175
+
```
176
+
131
177
### DateTimePickerFields
132
178
133
179
The `DateTimePickerFields` extends `GridLayout` that contains instances of `DatePickerField` and `TimePickerField`, when tapped, they open a picker dialog that allows date/time selection.
| `pickDate(options: DatePickerOptions, style?: DateTimePickerStyle): Promise<Date>` | picks a date from a dialog picker initialized with the provided options and styled with the optionally provided style. |
230
276
| `pickTime(options: TimePickerOptions, style?: DateTimePickerStyle): Promise<Date>` | picks a time from a dialog picker initialized with the provided options and styled with the optionally provided style. |
277
+
| `close()` | closes the presented dialog picker |
> Firebase will not set the User.emailVerified property to true if your user logs in with Facebook. Should your user login using a provider that verifies email (e.g. Google sign-in) then this will be set to true.
189
+
> **Note:** Firebase will not set the User.emailVerified property to true if your user logs in with Facebook. Should your user login using a provider that verifies email (e.g. Google sign-in) then this will be set to true.
Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent to the user (using the provided phone number) containing a unique code. Once the code has been authorized, the user is able to sign into Firebase.
252
250
253
-
> Phone numbers that end users provide for authentication will be sent and stored by Google to improve spam and abuse prevention across Google service, including to, but not limited to Firebase. Developers should ensure they have the appropriate end-user consent prior to using the Firebase Authentication phone number sign-in service.authentication
251
+
> **Note:**Phone numbers that end users provide for authentication will be sent and stored by Google to improve spam and abuse prevention across Google service, including to, but not limited to Firebase. Developers should ensure they have the appropriate end-user consent prior to using the Firebase Authentication phone number sign-in service.authentication
254
252
255
253
Firebase Phone Authentication is not supported in all countries. Please see their [FAQs](https://firebase.google.com/support/faq/#develop) for more information.
0 commit comments