Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nativescript-timedatepicker-renet

leocaseiro221.2.1TypeScript support: included

A NativeScript module providing native Android time and date pickers

NativeScript

readme

nativescript-timedatepicker

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

Android side

alt tag

iOS side

alt tag

Usage


//Import the plugin
import * as TimeDatePicker from 'nativescript-timedatepicker';

//Create a callback function
let mCallback =  ((result) => {
  if (result) {
    alert("the time is "+result);
  }
});

//Initialize the PickerManager (.init(yourCallback, title, initialDate))
TimeDatePicker.init(mCallback,null,null);

//Show the dialog
TimeDatePicker.showDatePickerDialog();

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