Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-datetime-picker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-datetime-picker

Cordova Date Time Picker Plugin to utilise the native Windows Phone 8 toolkit date and time selectors.

  • 0.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Date Time Picker Plugin

for Apache Cordova (Windows Phone 8)

Install

Latest published version on npm (with Cordova CLI >= 5.0.0)
cordova plugin add cordova-plugin-datetime-picker
Latest version from GitHub
cordova plugin add https://github.com/leecrossley/cordova-plugin-datetime-picker.git

Currently requires you to include the Microsoft.Phone.Controls.Toolkit and Coding4Fun.Toolkit.Controls (both available via nuget), although I'm working to break this dependency.

Coding4Fun.Toolkit.Controls is used for the timepicker, as the default WPToolkit implementation does not support intervals (steps), such as being able to only select 15 minute intervals.

Usage

You do not need to reference any JavaScript, the Cordova plugin architecture will add a datetimepicker object to your root automatically when you build.

Ensure you use the plugin after your deviceready event has been fired.

Example

var onDateSelected = function (date) {
    console.log(new Date(parseInt(date, 10)));
}

datetimepicker.selectDate(onDateSelected);

var onTimeSelected = function (time) { console.log(new Date(parseInt(time, 10))); }

datetimepicker.selectTime(onTimeSelected);


Once the date is selected, the callback function `onDateSelected` will log the selected date (as a JavaScript Date object) to the console.

### Screenshot

![Screenshot](https://raw.githubusercontent.com/leecrossley/cordova-plugin-datetime-picker/master/screenshot.jpg)

## Platforms

Windows Phone 8 support only.

### Credits

This plugin is based on code written by sbregnov and hypermurea.

## License

[MIT License](http://ilee.mit-license.org)

Keywords

FAQs

Package last updated on 29 Apr 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc