First, the date string has to be in YYYY-MM-DD format if I remember correctly. Also, make sure that you are using an HTML 5 compliant browser. This means IE 10 or FireFox, Chrome, Safari, etc..
Don't forget to mark useful responses as Answer if they helped you towards a solution.
First, the date string has to be in YYYY-MM-DD format if I remember correctly. Also, make sure that you are using an HTML 5 compliant browser. This means IE 10 or FireFox, Chrome, Safari, etc..
Thanks Markfitzme,
the problem is not at the date format, it was in the web browser dispite of having the latest verison.
Muhammad El-...
Member
1 Points
3 Posts
Problem with date textmode for textbox in vs2012 .net 4.5
Nov 05, 2012 11:33 PM|LINK
Hi all,
I have a problem with a textbox control which had a property textmode="date"
the problem is that this textbox does not read any correct date text from code behind and showes empty field at the webpage.
I tried it by all possible ways.
as the following
The ASPX code:
<asp:TextBox ID="TextBox_BirthDate" runat="server" TextMode="Date"></asp:TextBox>
The VB code:
Me.TextBox_BirthDate.Text = dv.Table.Rows(0).Item("DoB").ToShortDateString
Or
Dim temp As Date = New Date(month:=12, day:=31, year:=1989)
Me.TextBox_BirthDate.Text = temp
Kindly any one had a solution for this.
thanks for your coopertation
markfitzme
Star
14471 Points
2236 Posts
Re: Problem with date textmode for textbox in vs2012 .net 4.5
Nov 06, 2012 12:15 AM|LINK
First, the date string has to be in YYYY-MM-DD format if I remember correctly. Also, make sure that you are using an HTML 5 compliant browser. This means IE 10 or FireFox, Chrome, Safari, etc..
oned_gk
All-Star
31764 Points
6491 Posts
Re: Problem with date textmode for textbox in vs2012 .net 4.5
Nov 06, 2012 12:32 AM|LINK
TextMode only can have 3 deferent values : SingleLine, MultiLine, and password. Dont have "date" value
What do you mean not correct date text? Maybe you have deferent culture, change to appropriate uiculturw
Try set page culture / uiculture
http://msdn.microsoft.com/en-us/library/bz9tc508(v=vs.100).aspx
Muhammad El-...
Member
1 Points
3 Posts
Re: Problem with date textmode for textbox in vs2012 .net 4.5
Nov 06, 2012 12:42 AM|LINK
Thanks oned_gk,
but Date is supported on Visual Studio 2012 * .Net Framework 4.5 which i am using now.
thanks
Muhammad El-...
Member
1 Points
3 Posts
Re: Problem with date textmode for textbox in vs2012 .net 4.5
Nov 06, 2012 01:01 AM|LINK
Thanks Markfitzme,
the problem is not at the date format, it was in the web browser dispite of having the latest verison.