Skip to content

davidrabinowitz/com.dileep.plugins.datepicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DatePicker Plugin for android and ios using PhoneGap / Cordova 3.0

Installation

  1. Make sure that you have Node and Cordova CLI or PhoneGap's CLI or Cordova Plugman installed on your machine.

  2. Add a plugin to your project using Cordova CLI:

cordova plugin add https://github.com/kdileep1990/com.dileep.plugins.datepicker

Or using PhoneGap CLI:

phonegap local plugin add https://github.com/kdileep1990/com.dileep.plugins.datepicker

3a) Register plugin within config.xml of your app Android

<feature name="DatePicker">
    <param name="android-package" value="com.dileep.plugins.datepicker.DatePickerPlugin"/>
</feature>

iOS

<feature name="DatePicker">
    <param name="ios-package" value="DatePicker"/>
</feature>

3b) If you are using PhoneGap build service add to config.xml

<gap:plugin name="com.dileep.plugins.datepicker" />
  1. The clobber definition of the plugin is called datePicker. So you can reference to the plugin from anywhere in your code.

Example:

// defining options
var options = {
  date: new Date(),
  mode: 'date'
};
// calling show() function with options and a result handler
datePicker.show(options, function(date){
  console.log("date result " + date);  
});

Check section "Options" below to see all options.

Options

mode

The mode of the date picker.

Typ: String

Values: "date" / "time" / "datetime"

Default: 'datetime'

date

Selected date.

Typ: String

Default: new Date()

allowOldDates

Shows or hide dates earlier then selected date.

Typ: Boolean

Values: true / false

Default: true

allowFutureDates

Shows or hide dates after selected date.

Typ: Boolean

Values: true / false

Default: true

Requirements

  • PhoneGap 3.0 or newer /Cordova 3.0 or newer
  • Android/iOs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 92.2%
  • Java 6.7%
  • JavaScript 1.1%