How to get calendar view for datepicker using cordova-plugin-datepicker
Topiya opened this issue · comments
Topiya commented
Hello,
Is there any way to customize below code to get calendar view for datepicker using cordova-plugin-datepicker?
this.datePicker.show({
date: new Date(),
mode: 'date',
androidTheme: this.datePicker.ANDROID_THEMES.THEME_TRADITIONAL
}).then(
date => console.log('Got date: ', date),
err => console.log('Error occurred while getting date: ', err)
);
Diluk Angelo commented
These are the Themes
DatePicker.prototype.ANDROID_THEMES = {
THEME_TRADITIONAL : 1, // default
THEME_HOLO_DARK : 2,
THEME_HOLO_LIGHT : 3,
THEME_DEVICE_DEFAULT_DARK : 4,
THEME_DEVICE_DEFAULT_LIGHT : 5,
Theme_Material_Dialog_Alert : 6,
Theme_Material_Dialog_Alert : 7,
Theme_Material_Light_Dialog_Alert : 8,
Theme_DeviceDefault_Dialog_Alert : 9,
Theme_DeviceDefault_Light_Dialog_Alert : 10
};
use the integer value for the theme.
this.datePicker.show({
date: new Date(),
mode: 'date',
androidTheme: 6
}).then(
date => console.log('Got date: ', date),
err => console.log('Error occurred while getting date: ', err)
);
arupnayak commented
@Topiya Just figured out how to get calendar view. Use any of the below themes to get Calendar view
ANDROID_THEMES.THEME_DEVICE_DEFAULT_DARK
ANDROID_THEMES.THEME_DEVICE_DEFAULT_LIGHT
GavinLH commented
How to Realize Multilingualism?
maudvd commented
Is there any way to get the calendar view on iOS ?