Closed whenlit closed 7 years ago
I need the locale import, so I wouldn't load moments-import.html
and next load moment-with-locales-import.html
, because the first moments-import.html
would be useless.
I prefer to load only moment-with-locales-import.html
, and now I MUST to delete the row 10 in paper-calendar.html
in order not to overwrite the moment instance from the "locale's one" to the "without-locale's one":
...
09: <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
10: <!--<link rel="import" href="../moment-element/moment-import.html">-->
11: <link rel="import" href="paper-date-picker-icons.html">
...
The proposed fix means that who wants the locales need to loads moment-with-locales-import.html
AFTER all paper-date-picker
loads. Why not to load only the "locale version"? It would be a little more heavy, but it will solve all this issues.
Since 28e505c,
paper-calendar.html
loadsmoment-import.html
instead ofmoment-with-locales-import.html
, butpaper-date-picker.html
doesn't.paper-date-picker.html
loadsmoment-with-locales-import.html
before loadingpaper-calendar.html
, which in turn loadsmoment-import.html
. The app ends up withwindow.moment
pointing to the moment object without locales, and the locales cannot be html-imported anymore because they have already been imported.I think
paper-date-picker.html
should also importmoments-import.html
instead ofmoment-with-locales-import.html
. This way, a user can decide for themselves to import the locales after importing the date picker.EDIT: I see there already is a fix for this. +1!