Masked Textbox losing AM/PM values on focus

4 posts, 0 answers
  1. salik
    salik avatar
    3 posts
    Member since:
    May 2011

    Posted 19 May 2011 Link to this post

    Hi,

    I am using the mask for the Textbox to diplay time in format 12:05 AM in popup.The value is showing as 12:05 as default and AM/PM is disabled.

    when focusing on the control(Textbox) the value AM/PM not displayed and after losing focues its displayied.
    while clicking on the data in Textbbox AM/PM gets enabled

    The properties are given as follows fior the textbox
    <control id="txtTimeOfLoss">
    <Type>TextBox</Type>
    <MaskType>Time</MaskType>
    <Mask>99:99</Mask>
    <AcceptAMPM>true</AcceptAMPM>
    <Width>60</Width>
    </control>


  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 19 May 2011 Link to this post

    I'm not sure how you're setting this up. Can you please post your ASPX code and any associated code-behind files?

    Thanks,
    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. salik
    salik avatar
    3 posts
    Member since:
    May 2011

    Posted 20 May 2011 Link to this post

    The above is the xml file used for the setting of the textbox for displying the Time in format of 12:04 AM/PM.

    There are different code beind files used to bring the data.The data coming perfecyly.only the thing is while displaying the Time in the textbox is showing as 12:04 and AM/PM value is lost,when focus on the textbox the value is coming and is showing as 12:04 AM/PM.I think this is causing with any mask property setting for the textbox.i tried many but no luck..

    The textbox properties mentioend as in the thread(xml)
  5. O'Man
    O'Man avatar
    34 posts
    Member since:
    Oct 2009

    Posted 24 May 2011 Link to this post

    Hi,

    Maybe you needs sets display mask in adition. I also see your mask contain number only 99:99. How you set AM/PM values? Why not paste some code snipers that show your mask textbox markup?

    I hope helps.
    Oman
Back to Top