Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
docs(dateLocale): make parse function reflect real moment use.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn committed Sep 22, 2015
1 parent 4a16038 commit bf82512
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/datepicker/dateLocaleProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
*
* // Example uses moment.js to parse and format dates.
* $mdDateLocaleProvider.parseDate = function(dateString) {
* return moment(dateString).toDate();
* var m = moment(dateString, 'L', true);
* return m.isValid() ? m.toDate() : new Date(NaN);
* };
*
* $mdDateLocaleProvider.formatDate = function(date) {
Expand Down

0 comments on commit bf82512

Please sign in to comment.