Merge pull request #29006 from masiama/patch-2

[pikaday] Add missing second parameter for setMoment
This commit is contained in:
Jesse Trinity
2018-09-19 15:09:54 -07:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ declare class Pikaday {
/**
* Set the current selection with a Moment.js object (see setDate).
*/
setMoment(moment: any): void;
setMoment(moment: any, preventOnSelect?: boolean): void;
/**
* Change the current view to see a specific date.
+1
View File
@@ -32,6 +32,7 @@ new Pikaday({field: $('#datepicker')[0]});
picker.setDate('2015-01-01');
picker.getMoment();
picker.setMoment(moment('14th February 2014', 'DDo MMMM YYYY'));
picker.setMoment(moment('14th February 2014', 'DDo MMMM YYYY'), true);
picker.gotoDate(new Date(2014, 1));
picker.gotoToday();
picker.gotoMonth(2);