danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
140 stars 60 forks source link

Allow Angular locale data to be missing when computing first day of week #115

Closed JoostK closed 3 years ago

JoostK commented 3 years ago

In 407a7f8623f2ee42251e94415f9a2d382ea99b9a the first day of the week would be automatically computed from the current locale, based on Angular's locale data. This would throw an error when the locale data is missing, causing the calender view to be completely empty.

Additionally, this fixes a subtle bug where changing the locale multiple times would only recompute the first day of the week during the first locale change, not any subsequent ones.

Fixes #110

JoostK commented 3 years ago

Arguably the first day of week computation should be moved into the adapter, but this would likely be a larger change and possibly be a breaking change as well; hence I opted for this approach to at least avoid the hard crash.

danielmoncada commented 3 years ago

@JoostK thanks, i'll try my best to merge today