Skip to content
No description, website, or topics provided.
TypeScript JavaScript CSS Ruby
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead, 17 commits behind AntonioCuevaUrraco:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
plugin
README.md

README.md

nativescript-timedatepicker

A NativeScript plugin providing native date and time pickers for Android and iOS.

##Android side alt tag ##iOS side alt tag

Usage

//Require it
var PickerManager= require("nativescript-timedatepicker");
//Create a callback function
var mCallback = function (result) {
  if (result) {
    alert("the time is "+result);
  }
};
//Initialize the PickerManager (.init(yourCallback, title, initialDate))
PickerManager.init(mCallback,null,null);
//Show the dialog
PickerManager.showTimePickerDialog();
//If you want to convert the string into a js Date I recomend to use moment.js
  var scheduleMoment = moment(result, "DD MM YYYY HH:mm z");
  var scheduleDate = scheduleMoment.toDate();

For more examples of usage see the demo main-view-model.ts.

##Credits This plugin abstract two native libraries, hence here are the project and deserved merit to the creators.

For iOS https://github.com/hackiftekhar/IQActionSheetPickerView
For Android https://github.com/CiTuX/datetimepicker

You can’t perform that action at this time.