
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@capacitor-community/date-picker
Advanced tools

@capacitor-community/date-picker
Capacitor community plugin for native Date Picker
| Maintainer | GitHub | Social |
|---|---|---|
| Stewan Silva | stewones | @stewones |
| Daniel Pereira | danielprrazevedo | @DandanPrr |
We're starting fresh under an official org. If you were using the previous npm package capacitor-datepick, please update your package.json to @capacitor-community/date-picker. Check out changelog for more info.
Using npm:
npm install @capacitor-community/date-picker
Using yarn:
yarn add @capacitor-community/date-picker
Sync native files:
npx cap sync
from 2.* to 3.* we have some new settings.
You can see in definitions file, we hava the sections ios and android. You must change your format configs to ios and android configs.
To maintain the consistency of the community plugins, we changed the name of the variable the plugin is in. As we are experiencing a change across the capacitor plugins import ecosystem, we think this is a good opportunity to do that
Before, to use the plugin, you needed to import like this
import '@capacitor-community/date-picker';
import { Plugins } from '@capacitor/core';
const { DatePickerPlugin } = Plugins;
Now, we not have the Plugins variable and we not register the DatePickerPlugin in Capacitor.Plugins
To use this plugin.
Now, to use this plugin, you need to do this
import { DatePicker } from '@capacitor-community/date-picker';
You need to replace all of your code
You must also follow the guide for android.
present(DatePickerOptions): Promise<{ value:string }>DatePickerOptions)These options can be used through the present method and/or within capacitor.config.json
| name | type | default |
|---|---|---|
| format | string | "yyyy-MM-dd'T'HH:mm:ss.sssZ" |
| style | string | if iOS 14 "inline" else only "wheels" |
| locale | string | current device |
| date | string | current date |
| mode | DatePickerMode | "dateAndTime" |
| theme | DatePickerTheme | current device |
| timezone | string | current device |
| min | string | null |
| max | string | null |
| doneText | string | "OK" |
| cancelText | string | "Cancel" |
| is24h | boolean | false |
| titleFontColor | string | null |
| titleBgColor | string | null |
| bgColor | string | null |
| fontColor | string | null |
| buttonBgColor | string | null |
| buttonFontColor | string | null |
DatePickerOptions)These options can be used through the present method and/or within capacitor.config.json
| name | type | default |
|---|---|---|
| format | string | "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" |
| locale | string | current device |
| date | string | current date |
| mode | DatePickerMode | "dateAndTime" |
| theme | DatePickerTheme | "light" |
| timezone | string | current device |
| min | string | null |
| max | string | null |
| doneText | string | "OK" |
| cancelText | string | "Cancel" |
| is24h | boolean | false |
For more information check the
definitionsfile
For format, we defined the old config deprecated because we have a inconsistence between Android and iOS platforms
now you need define your forma config in android.format and ios.format
For format in iOS, you need to follow this documentation
For format in Android, you need to follow this documentation
You can define your personalized themes in android via resources styles check example app
How you see in example, just define your picker theme in global assets your app and send via android.theme prop in your capacitor.config file or your options.android.theme in present call.

import { DatePicker } from '@capacitor-community/date-picker';
import type { DatePickerTheme } from '@capacitor-community/date-picker/src';
const selectedTheme: DatePickerTheme = 'light';
DatePicker.present({
mode: 'date',
locale: 'pt_BR',
date: '13/07/2019',
theme: selectedTheme,
ios: {
format: 'dd/MM/yyyy',
},
android: {
format: 'dd/MM/yyyy',
},
}).then(date => alert(date.value));
{
//...
"plugins": {
"DatePickerPlugin": {
"mode": "date",
"locale": "pt_BR",
"current": "13/07/2019",
"format": "dd/MM/yyyy",
"android": {
"theme": "MyCustomeTheme"
},
"ios": {
"style": "wheels"
}
}
}
}
ionic start my-cap-app --capacitorcd my-cap-appnpm install --save @capacitor-community/date-pickermkdir www && touch www/index.htmlsudo gem install cocoapods (only once)npx cap add iosnpx cap sync ios (every time you run npm install)npx cap open iosTip: every time you change a native code you may need to clean up the cache (Product > Clean build folder) and then run the app again.
ionic start my-cap-app --capacitorcd my-cap-appnpm install --save @capacitor-community/date-pickermkdir www && touch www/index.htmlnpx cap add androidnpx cap sync android (every time you run npm install)npx cap open androidNow you should be set to go. Try to run your client using ionic cap run android --livereload --address=0.0.0.0.
Tip: every time you change a native code you may need to clean up the cache (Build > Clean Project | Build > Rebuild Project) and then run the app again.
For existing projects you can upgrade all capacitor related packages (including this plugin) with this single command
npx npm-upgrade '*capacitor*' && npm install
https://github.com/capacitor-community/date-picker/tree/master/example
MIT
Thanks goes to these wonderful people (emoji key):
Stew 💻 📖 | Daniel Pereira 💻 📖 🚧 | Caroline Oliva 💻 | jcesarmobile 💻 | Valentin 💻 | Jordi De Pau ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Native DateTime Picker Plugin for Capacitor Apps
The npm package @capacitor-community/date-picker receives a total of 2,086 weekly downloads. As such, @capacitor-community/date-picker popularity was classified as popular.
We found that @capacitor-community/date-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 47 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.