md-datepicker format
Hello! When manually entering the date incorrectly displays the result - http://take.ms/mm0hr Tell me, please, what is the problem
@MariskaS Can you please provide a demo for your issue?
http://codepen.io/anon/pen/GZpeeL
how to reproduce the bug - http://take.ms/4BF9l
I can't reproduce that bug. In my browser everything works as expected, the month and days are reflected because you specified the filter date:'dd/MM/yyyy'

I manualy put date with format dd/MM/yyyy and I want to see date with the same format (I use filter date: dd/MM/yyyy). But I don't see wanted value. What's going on?
Please look again an example http://take.ms/1lmZj
@DevVersion, I have reported this issue before, and also heard that you cant reproduce it.
I am wondering if you guys are sitting on a computer, localized to an area where the "other" dateformat is the default setting. In that case, it might be that this does not pop up as a problem for you.
We see the problem on all our devices - and we are sitting in Denmark, where DD/MM/YYYY is the default setting.
Link to duplicate issue, which still isn't resolved (but it is incorrecly marked as closed): https://github.com/angular/material/issues/6053
Do you have the parseDate function set?
$mdDateLocaleProvider.parseDate = function(dateString) {
var m = moment(dateString, 'D.M.YYYY', true);
return m.isValid() ? m.toDate() : new Date(NaN);
};
@runethh Is your issue the same as #7458.
@topherfangio Yes, that appear to be the same issue
hi,
recently got faced with this too. After looking to the code I think that DateLocaleProvider's defaultFormatDate and defaultParseDate are inconsistent: if we do use toLocaleDateString() in formatter then we also need to use fromLocaleString() when parsing user input :D
I know, there is not such function [yet] and new Date() expects standard formatted date, so we need to use the same default formatter without considering localization at all. For those who need the things to be localized there must be a ways to do it easily (eg using $mdDateLocaleProvider or even with angular i18n library)
Until input and output are consistent we have that we have: shown as d/M/y but input is required to be M/d/y which is misleading
Yeah, I mentioned this in https://github.com/angular/material/issues/7456. If your default locale date format can't be parsed by new Date, then the value being set will be invalid. I've tried looking into this and it could be worked around relatively easily by having a test that checks which position the day, month and year are in, but I'm not sure how this would work with locales that don't use "regular" numbers (e.g. check the Arabic examples on the MDN article).
@crisbeto why to embed i18n support to the core? strip it off from there, everybody who needs localization can use some means to achieve that
eg. there can be default @mdDateLocaleProvider init part in the material library checking if angular's core i18n library presents and taking the proper formats from there, defaulting to no-locale
Well the the method for formatting the date can be overwritten, however I'd say that it makes sense that we shouldn't try to assume the date formatting. I'll look into it again.
This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.