VitaliiBlagodir / cordova-plugin-datepicker

MIT License
319 stars 350 forks source link

How to get calendar view for datepicker using cordova-plugin-datepicker #241

Open Topiya opened 6 years ago

Topiya commented 6 years ago

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)
      );
dilukangelosl commented 6 years ago

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 5 years ago

@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 5 years ago

How to Realize Multilingualism?

maudvd commented 3 years ago

Is there any way to get the calendar view on iOS ?