0

My textbox has MaskedEditExtender, but the problem is that when user clicks on the textbox, the cursor is positioned at end (right side) rather than the left side begning. Can someone help? There were some solution to have a java script function on onfocus, but ASP.net text does not have onfoucs event to be set.

<asp:TextBox ID="TextBox5" runat="server" CssClass="MainContent" ValidationGroup="MKE" Width="180px" />
                                        <asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server"
                                            AcceptNegative="Left"  MaskType="Date" DisplayMoney="Left" ErrorTooltipEnabled="True" 
                                            mask="9999/99/99" MessageValidatorTip="true"  InputDirection="RightToLeft" CultureName="sv-SE" 
                                            OnFocusCssClass="MainContent" OnInvalidCssClass="MainContent" 
                                            TargetControlID="TextBox5"   />
user3033921
  • 189
  • 1
  • 8
  • 21

1 Answers1

1

I think the problem comes from the property InputDirection... Try

InputDirection="LeftToRight"
homega52
  • 83
  • 1
  • 5
  • Thanks , but this does not resolve the cursor position. once user click its still at end of the textbox. the reason is that the mask is being treated as a text in the textbox and cursor goes after it..i am just guessing ! – user3033921 Feb 04 '14 at 15:57
  • I tried your exact code and there is no problem for me...Perhaps the problem comes from your CssClass MainContent...Have you tried not to use it? – homega52 Feb 04 '14 at 16:15
  • So when you double click on the Textbox to enter the date, what is the initial position of cursor? left side or right side? – user3033921 Feb 04 '14 at 19:32
  • the cursor position is left side – homega52 Feb 05 '14 at 09:17