MaskedEditExtender autocomplete problem with time completion

Last post 04-01-2008 6:05 AM by sip05ma4. 5 replies.

Sort Posts:

  • MaskedEditExtender autocomplete problem with time completion

    03-07-2007, 4:57 PM
    • Member
      point Member
    • hessenmob
    • Member since 03-07-2007, 9:53 PM
    • Posts 2

    When I use a MaskedEditExtender for time entry with autocomplete on, the control

    always completes with the current time exmpl: entered 12:__ --> current time on server is 12:14

    it completes to 12:14 but I want it to complete to 12:00, what can I do?

    Any suggestions?

    Thanks,

    Johannes

  • Re: MaskedEditExtender autocomplete problem with time completion

    03-09-2007, 12:30 AM
    • Member
      240 point Member
    • FernandoCerqueira
    • Member since 01-10-2005, 9:55 PM
    • Brazil - Rio de Janeiro
    • Posts 92
    Hi Johannes,

    You can to use the property Autocompletevalue (autocompletevalue overwrite current time)

    <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TextBox3"
    Mask="99:99"
    MessageValidatorTip="true"
    OnFocusCssClass="MaskedEditFocus"
    OnInvalidCssClass="MaskedEditError"
    MaskType="Time"
    AcceptAMPM="True"
    AutoCompleteValue="00:00"

    CultureName="en-US" />

    Btw, the route AutocompleteTime have a small bug Crying.  The workarround is download my last changeset (19659) and try again.

    Thanks your feedback!
    Fernando Cerqueira
    MVP ASP.NET Brasil
    www.fci.com.br
  • Re: MaskedEditExtender autocomplete problem with time completion

    03-09-2007, 7:43 AM
    • Member
      point Member
    • hessenmob
    • Member since 03-07-2007, 9:53 PM
    • Posts 2

    Thanks for your Answer, 

    the Bug appears, when i remove all Numbers, then I add just the hours part up to the ':' then

    I tab out with Tabulator and the minutes are not completed, they stay empty. Is this what your

    fix is about?

  • Re: MaskedEditExtender autocomplete problem with time completion

    03-09-2007, 7:55 AM
    • Member
      240 point Member
    • FernandoCerqueira
    • Member since 01-10-2005, 9:55 PM
    • Brazil - Rio de Janeiro
    • Posts 92
    Fernando Cerqueira
    MVP ASP.NET Brasil
    www.fci.com.br
  • Re: MaskedEditExtender autocomplete problem with time completion

    03-09-2007, 8:07 AM
    • Member
      240 point Member
    • FernandoCerqueira
    • Member since 01-10-2005, 9:55 PM
    • Brazil - Rio de Janeiro
    • Posts 92
    Hi Johannes,

    Partial detail of the modifications:

    The bug is because  the substring function is wrote wrong at piece code  (The behavior of substring function is different  in JS to C#  ) :

       

        , AutoFormatTime : function()

        {

                  
            if (this._AutoCompleteValue != "" )

            {

                Mcur = this._AutoCompleteValue.substring(3,2); <---

                // replace to  this._AutoCompleteValue.substring(3,5)

            }

                  
          if (this._maskvalid == "99" + this.get_CultureTimePlaceholder()…

            {

                if (this._AutoCompleteValue != "" )

                {

                    Scur = this._AutoCompleteValue.substring(5); <-----

                  // replace to  this._AutoCompleteValue.substring(6);

                }


    I fixed the bug at  http://www.codeplex.com/AtlasControlToolkit/SourceControl/DownloadSourceCode.aspx?changeSetId=19659 befor my answer to you Smile

    Fernando Cerqueira
    MVP ASP.NET Brasil
    www.fci.com.br
  • Re: MaskedEditExtender autocomplete problem with time completion

    04-01-2008, 6:05 AM
    • Member
      4 point Member
    • sip05ma4
    • Member since 04-01-2008, 5:45 AM
    • Swindon UK
    • Posts 2

    Hi  Fernando,

    I have the same problem of autocomplete with extender control

    <ajaxToolkit:MaskedEditExtender
                                                                        AutoComplete="true"
                                                                        AutoCompleteValue="01/01/2008 08:08"
                                                                        runat="server"
                                                                        ID="maskedFinish"
                                                                        Mask="99/99/9999 99:99"
                                                                        MessageValidatorTip="true"
                                                                        MaskType="dateTime"
                                                                       
                                                                        TargetControlID="txtFinishDateTime" 
                                                                        ClearMaskOnLostFocus="false" />

    I downloaded your new codefile and still its not working

    can you please help me?

     
    thanks in advance

    Martin
     

Page 1 of 1 (6 items)