nativescript-material-datetimepicker
Advanced tools
+1
-1
| { | ||
| "name": "nativescript-material-datetimepicker", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "NativeScript Plugin to use Material Design Date and Time Picker", | ||
@@ -5,0 +5,0 @@ "main": "material-datetimepicker", |
+26
-21
@@ -6,2 +6,7 @@ # nativescript-material-datetimepicker | ||
| ## Screenshots | ||
|  | ||
|  | ||
| ## Installation | ||
@@ -19,27 +24,27 @@ | ||
| const MDTPicker = require("nativescript-material-datetimepicker").MaterialDatetimepicker(); | ||
| const MDTPicker = require("nativescript-material-datetimepicker").MaterialDatetimepicker(); | ||
| const mDtpicker = new MDTPicker(); | ||
| const mDtpicker = new MDTPicker(); | ||
| // Pick Date | ||
| exports.selectDate = function() { | ||
| // Pick Date | ||
| exports.selectDate = function() { | ||
| mDtpicker.pickDate() | ||
| .then((result) => { | ||
| this.set("date", "Date is: " + result.day + "-" + result.month + "-" + result.year); | ||
| }) | ||
| .catch((error) => { | ||
| console.log("Error: " + error); | ||
| }) | ||
| } | ||
| .then((result) => { | ||
| console.log("Date is: " + result.day + "-" + result.month + "-" + result.year); | ||
| }) | ||
| .catch((error) => { | ||
| console.log("Error: " + error); | ||
| }); | ||
| }; | ||
| // Pick Time | ||
| exports.selectTime = function() { | ||
| this.materialDatetimepicker.pickTime() | ||
| .then((result) => { | ||
| this.set("time", "Time is: " + result.hour + ":" + result.minute); | ||
| }) | ||
| .catch((error) => { | ||
| console.log("Error: " + error); | ||
| }) | ||
| } | ||
| // Pick Time | ||
| exports.selectTime = function() { | ||
| mDtpicker.pickTime() | ||
| .then((result) => { | ||
| console.log("time", "Time is: " + result.hour + ":" + result.minute); | ||
| }) | ||
| .catch((error) => { | ||
| console.log("Error: " + error); | ||
| }); | ||
| }; | ||
@@ -46,0 +51,0 @@ ``` |
21528
1.3%75
7.14%