Open rposener opened 9 years ago
AMD is already in upstream for 1.5.0
How about the locales?
Sent from my Windows Phone
From: hebbetmailto:notifications@github.com Sent: 7/13/2015 1:22 PM To: eternicode/bootstrap-datepickermailto:bootstrap-datepicker@noreply.github.com Cc: Ryan Posenermailto:ryanposener@msn.com Subject: Re: [bootstrap-datepicker] Add AMD Support (#1484)
AMD is already in upstream for 1.5.0
Reply to this email directly or view it on GitHub: https://github.com/eternicode/bootstrap-datepicker/issues/1484#issuecomment-121029110
+1
+1 does anyone know how to shim the locales? I can't get them to work at all.
if anyone is wondering, I just wrapped an existing locale file with:
define([
'datepicker'
], function() {
// the locale file code is here
});
And datepicker
is just the path to the bootstrap-datepicker
module.
Is there any chance to get the locales working natively with amd?
Hi,
While PR https://github.com/uxsolutions/bootstrap-datepicker/pull/1196 made the main script compatible with AMD and CommonJS using a UMD wrapper, locale files are still assuming jQuery
is available globally.
See for example the French locale file: https://github.com/uxsolutions/bootstrap-datepicker/blob/d03ecd62619a871597abffc0cc6fd88f73b79020/js/locales/bootstrap-datepicker.fr.js#L5 https://github.com/uxsolutions/bootstrap-datepicker/blob/d03ecd62619a871597abffc0cc6fd88f73b79020/js/locales/bootstrap-datepicker.fr.js#L18
The fix would be to refactor all locale file to use the same UMD wrapper as the main file.
Include AMD support for the picker, and the locale files.