I installed the Date Picker plugin in my project.
In the component with import { DataPicker } from 'ionic-native' top, if I use it as (with androidTheme parameter comment), it WORKS :
let options = { date: new Date(), mode: 'date', // androidTheme: DatePicker.ANDROID_THEMES.THEME_HOLO_LIGHT }; DatePicker.show(options).then( (date) => { console.log('date_value:' + date) }).catch( (error) => { });
If I uncomment androidTheme:DatePicker.ANDROID_THEMES.THEME_HOLO_LIGHT , there will be an error during the build process:
Property ANDROID_THEMES 'does not exist for type' typeof DatePicker '
I did npm install ionic-native in the CLI in my project folder as as here , but that didn't fix the problem. This gives me the following result (which seems good to me):
`- ionic-native @2.0.3
npm WARN optional Failed to skip the optional dependency / chokidar / fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15
When I look under [my project]\plugins\cordova-plugin-datepicker\www , it contains 3 folders corresponding to 3 platforms (ios, android, windows) with each JS file called "DatePicker.js" and that located under the android folder contained in the code:
DatePicker.prototype.ANDROID_THEMES = { THEME_TRADITIONAL : 1,
If I look in [my project]\nodes_modules\ionic-native\dist\plugins\ , the datepicker.js file exists (of course), but does not contain the features of each platform.
What happened? Why datepicker.js under [my project]\nodes_modules\ionic-native\dist\plugins\ not contain the features of each platform, despite the fact that the plug-in was added to the project?