Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: problem populating maskededitextender with date [28016]

$
0
0
I've upgraded to the latest ajax toolkit and now and having problems with the maskededitextender. It works great when my users are filling out forms but when I try to display the contents of the form later on, I cannot get the dates to populate. I narrowed things down to a small piece of code to demonstrate.
Here is the html for a textbox and mask:
<asp:TextBox ID="tbDOB" runat="server" MaxLength="20"></asp:TextBox>
<asp:MaskedEditExtender ID="MaskedEditDOB" runat="server" Mask="99/99/9999" MaskType="Date" TargetControlID="tbDOB" />

And in the vb.net code behind the page, I simply want to populate that textbox as follows:
tbDOB.text = "1/1/2015"
(Normally, this would be a date retrieved from the database - this is easier to see the issue)

When I load the page, the textbox appears with the mask (__/__/____) but does not put 1/1/2015 in the box.

What am I doing wrong? I swear this was working before I updated the toolkit so perhaps there is a different way to handle dates in the extender? If I get rid of the mask, then the date populates without a problem.

Comments: I am using version 15.1.4 I also have tried using leading zeroes. When I refresh the page it almost looks like the date is in the text box for a flickering moment before the mask appears So not only is the date not populating but the mask appears even though the control does not have focus Can you replicate on your end?

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>