I would recommend leaving the default model binder to do its work, it does a pretty good job of it and will deal with localization issues (ie. different date formats for different locales) for you.
Consider that there will always be restrictions on how a user can enter a date (you don't allow them to enter yyyy-MM-dd
for example, even though it is a valid date format). Your custom binder code won't change that because it supplies a format.
I'd suggest that your goal should be to permit users to enter dates in the format that would be most usual for them (eg. dd/MM/yyyy
in UK or Spain, MM/dd/yyyy
in US etc). That will deal with the majority of cases. If you need to cater for users in different locales, the default model binder will do it all for you, so long as you set the thread culture for the user session:
string cultureCode = "en-GB"; //retrieve eg. from user profile
Thread.CurrentThread.CurrentCulture = new CultureInfo(cultureCode)
If you want to help users who are inputting dates in other formats, simply put a hint on your page that explains the expected format.
If you really must accept multiple formats per locale, you will need to write a custom model binder, and might want to try passing an array of acceptable formats to it for each locale that you deal with.