Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

nativescript-material-datetimepicker

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-material-datetimepicker

NativeScript Plugin to use Material Design Date and Time Picker

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
2
Created
Source

nativescript-material-datetimepicker Build Status npm npm

Twitter URL

NPM

This plugin is a wrapper around android.app.DatePickerDialog for Android.

DEPRECATED - 25th Oct 2017

All functionality of this plugin, and more (including iOS Support), is now available at nativescript-modal-datetimepicker <3

Use this plugin, only if you don't need iOS support, and other additional features. Be warned, development of this plugin has been discontinued.

  • Shiv19

Screenshots

Date Picker

Time Picker

Installation

tns plugin add nativescript-material-datetimepicker

Usage

NativeScript Core


const MDTPicker = require("nativescript-material-datetimepicker").MaterialDatetimepicker;

const mDtpicker = new MDTPicker();

// Pick Date
exports.selectDate = function() {
    mDtpicker.pickDate()
        .then((result) => {
            console.log("Date is: " + result.day + "-" + result.month + "-" + result.year);
        })
        .catch((error) => {
            console.log("Error: " + error);
        });
};

// Pick Time
exports.selectTime = function() {
    mDtpicker.pickTime()
        .then((result) => {
            console.log("Time is: " + result.hour + ":" + result.minute);
        })
        .catch((error) => {
            console.log("Error: " + error);
        });
};

API

pickDate(): Promise<{}>;

Returns a promise that resolves to date object

date: {
    day: number,
    month: number,
    year: number
}

pickTime(is24HourView?): Promise<{}>;

Returns a promise that resolves to time object

time: {
    hour: number,
    minute: number
}

Passing true to this API, shows a 24hr View timepicker.

License

Apache License Version 2.0, January 2004

Keywords

NativeScript

FAQs

Package last updated on 25 Oct 2017

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