npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fitatu-cordova-plugin-datepicker

v0.9.2

Published

Cordova DatePicker Plugin

Downloads

3

Readme

DatePicker Plugin for Cordova/PhoneGap 4.0 (iOS and Android and Windows)

This is a combined version of DatePicker iOS and Android and Windows plugin for Cordova/Phonegap 4.0.

  • Original iOS version: https://github.com/sectore/phonegap3-ios-datepicker-plugin

  • Original Android version: https://github.com/bikasv/cordova-android-plugins/tree/master/datepicker

New in 0.8.0 (Android Only):

  • Android code refactored

  • Option datetime added (default if mode is unknown), opening a new time dialog after setting the date

  • Options okText and cancelText to define the labels for POSITIVE and NEGATIVE buttons

  • Option todayText to set the label of a button that selects current date (date and datetime)

  • Option nowText to set the label of a button that selects current time (time and datetime)

  • Option is24Hour added

Installation

cordova plugin add cordova-plugin-datepicker
phonegap local plugin add cordova-plugin-datepicker
<gap:plugin name="cordova-plugin-datepicker" source="npm" />

Usage

var options = {
    date: new Date(),
    mode: 'date'
};

function onSuccess(date) {
    alert('Selected date: ' + date);
}

function onError(error) { // Android only
    alert('Error: ' + error);
}

datePicker.show(options, onSuccess, onError);

Options

mode - iOS, Android, Windows

The mode of the date picker.

Type: String

Values: date | time | datetime (iOS, Windows only)

Default: date

date - iOS, Android, Windows

Selected date.

Type: String

Default: new Date()

minDate - iOS, Android, Windows

Minimum date.

Type: Date | empty String

Default: (empty String)

minDate is a Date object for iOS and a millisecond precision unix timestamp for Android, so you need to account for that when using the plugin. Also, on Android, only the date is enforced (time is not).

maxDate - iOS, Android, Windows

Maximum date.

Type: Date | empty String

Default: (empty String)

titleText - Android

Label for the dialog title. If empty, uses android default (Set date/Set time).

Type: String | empty String

Default: (empty String)

okText - Android

Label of BUTTON_POSITIVE (done button). If empty, uses android.R.string.ok.

Type: String | empty String

Default: (empty String)

cancelText - Android

Label of BUTTON_NEGATIVE (cancel button). If empty, uses android.R.string.cancel.

Type: String | empty String

Default: (empty String)

todayText - Android

Label of today button. If empty, doesn't show the option to select current date.

Type: String | empty String

Default: (empty String)

nowText - Android

Label of now button. If empty, doesn't show the option to select current time.

Type: String | empty String

Default: (empty String)

is24Hour - Android

Shows time dialog in 24 hours format.

Type: Boolean

Values: true | false

Default: false

androidTheme - Android

Choose the theme of the picker

Type: Int

Values: THEME_TRADITIONAL | THEME_HOLO_DARK | THEME_HOLO_LIGHT | THEME_DEVICE_DEFAULT_DARK | THEME_DEVICE_DEFAULT_LIGHT

Default: THEME_TRADITIONAL

allowOldDates - iOS

Shows or hide dates earlier then selected date.

Type: Boolean

Values: true | false

Default: true

allowFutureDates - iOS

Shows or hide dates after selected date.

Type: Boolean

Values: true | false

Default: true

doneButtonLabel - iOS

Label of done button.

Typ: String

Default: Done

doneButtonColor - iOS

Hex color of done button.

Typ: String

Default: #0000FF

cancelButtonLabel - iOS

Label of cancel button.

Type: String

Default: Cancel

cancelButtonColor - iOS

Hex color of cancel button.

Type: String

Default: #000000

x - iOS (iPad only)

X position of date picker. The position is absolute to the root view of the application.

Type: String

Default: 0

y - iOS (iPad only)

Y position of date picker. The position is absolute to the root view of the application.

Type: String

Default: 0

minuteInterval - iOS

Interval between options in the minute section of the date picker.

Type: Integer

Default: 1

popoverArrowDirection - iOS

Force the UIPopoverArrowDirection enum. The value any will revert to default UIPopoverArrowDirectionAny and let the app choose the proper direction itself.

Values: up | down | left | right | any

Type: String

Default: any

locale - iOS

Force locale for datePicker.

Type: String

Default: en_us

Requirements

  • Cordova 3.0+
  • iOS 6.0+
  • Android 2.3+