Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,

all i am using HTML textbox for to show date value in the text box using model.

something like this

@Html.TextBoxFor(x => x.ReleaseDate)

my date format is mm/dd/yyyy

now when i insert a date less then or equal to 12 it works fine but as i select date greater than 12 it takes 01/01/0001 as date and data do not want to save.


p.s. : when this code is used in edit mode it works fine but when we add a new data it do not work
Posted
Comments
Sinisa Hajnal 24-Sep-14 9:36am    
I'd say your input and edit modes have different format expectation. If you enter 12 or less if fine means that that position stands for month...update your question with exact input for your text box.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900