ionic-datepicker icon indicating copy to clipboard operation
ionic-datepicker copied to clipboard

Improvement request : integration with Moment.js

Open StephJan opened this issue 9 years ago • 3 comments

This (otherwise awesome) plugin could benefit from reusing locales as defined in Moment.js by slightly altering DatepickerNls :

this.getWeekdays = function(locale) { if (moment) { moment.locale(locale); return moment.weekdays(); } };

(same for Months)

This would guarantee consistency for apps already using Moment.js, plus provide a vast amount of high-quality translations for DatePicker

StephJan avatar Dec 22 '15 10:12 StephJan

Excellent! Thanks =D

rcluan avatar Jan 04 '16 18:01 rcluan

I'll work on this next week. Thank you for your suggestion.

celsomarques avatar Jan 08 '16 15:01 celsomarques

No problemo, I had to work with those two components and as any good-therefore-lazy developer I saw an opportunity to reuse someone else's work :)

StephJan avatar Jan 08 '16 15:01 StephJan