pickaday: correct naming of boolean method parameter on setDate

This commit is contained in:
andrewroyburk
2019-01-31 13:48:05 +01:00
parent f1eed296d2
commit ec2f9a6164
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ declare class Pikaday {
* can optionally be passed as the second parameter to prevent triggering
* of the onSelect callback, allowing the date to be set silently.
*/
setDate(date: string | Date, triggerOnSelect?: boolean): void;
setDate(date: string | Date, preventOnSelect?: boolean): void;
/**
* Returns a Moment.js object for the selected date (Moment must be
+1
View File
@@ -30,6 +30,7 @@ new Pikaday({field: $('#datepicker')[0]});
picker.toString('YYYY-MM-DD');
picker.getDate();
picker.setDate('2015-01-01');
picker.setDate('2015-01-01', true);
picker.getMoment();
picker.setMoment(moment('14th February 2014', 'DDo MMMM YYYY'));
picker.setMoment(moment('14th February 2014', 'DDo MMMM YYYY'), true);