RadDatePicker(radInput) can work like mask radinput text box

9 posts, 0 answers
  1. sweta
    sweta avatar
    21 posts
    Member since:
    Jun 2010

    Posted 16 Aug 2010 Link to this post


    Hello,

    i want to display --/--/---- in my datepicker controls textbox.
    i used emptymessage property but once i entered something in my textbox it removed the format --/--/----.

    i want that once user enter something it should display like that 12/--/----.

    is it possible to display like this?

    thanks
    Sweta
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 16 Aug 2010 Link to this post

    Hi Sweta,

    I am afraid RadDateInput does not support masks. Only RadMaskedTextBox does.

    Regards,
    Dimo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sourabh
    Sourabh avatar
    7 posts
    Member since:
    Jan 2012

    Posted 27 Mar 2012 Link to this post

    hello,

    i am facing a problem with datepicker.

    you see u can enter alphabets in textbox of rad datepicker is there any solution to avoid this and allow user to only allow to enter numeric values??
  5. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 29 Mar 2012 Link to this post

    Hi Sourabh,

    If you want to completely disable entering date, add this setting: EnableTyping="false"
    In order to disable just some of the keys you have to specify a function that will be called client-side when a key is pressed and to cancel it on the corresponding javascript.

    For example for disabling letters add this to your mark-up:
    • ASP:
    <telerik:RadDatePicker ... DateInput-ClientEvents-OnKeyPress="KeyPress">
    • JavaScript:
    <script type="text/javascript">
      function KeyPress(sender, eventArgs) {
         var keyPressed = eventArgs.get_keyCode();
         if ((keyPressed > 64 && keyPressed < 91
            || (keyPressed > 96 && keyPressed <
    123)) {
             eventArgs.set_cancel(true)
         }
      }
    </script>
    Note that you can disable additional keyboard keys by using their ASCII code as showed in the example.(65-90 for capitalized letters and 97-122 for small letters).

    I hope this helps. Good luck with your project.

    Greetings,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Sourabh
    Sourabh avatar
    7 posts
    Member since:
    Jan 2012

    Posted 30 Mar 2012 Link to this post

    thanks Eyup

    That helped, but i suggest that telerik team should add the feature of masked date-input in raddatepicker.

    Sourabh
  7. José Ángel
    José Ángel avatar
    3 posts
    Member since:
    Jan 2015

    Posted 10 Feb 2015 Link to this post

    Hi,
    what is the best way in the current version to have a RadDatePicker with Mask? I think it's mandatory to have a simple property for this and not weird combinations of components and javascript.

    Thanks
    Ángel.
  8. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 13 Feb 2015 Link to this post

    Hi Ángel,

    Currently, the only control which provides masking functionality is RadMaskedTextBox:
    http://demos.telerik.com/aspnet-ajax/input/examples/radmaskedtextbox/firstlook/defaultcs.aspx

    You can use the EmptyMessage property as an alternative to hint the users for the correct format:
    <telerik:RadDatePicker ...>
        <DateInput runat="server" EmptyMessage="Month/Day/Year">
        </DateInput>
    </telerik:RadDatePicker>

    You can also log a feature request about this requirement in our public portal and our developers may consider adding them for the future releases:
    http://feedback.telerik.com/Project/108


    Regards,
    Eyup
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. bhargavi
    bhargavi avatar
    5 posts
    Member since:
    Apr 2015

    Posted 15 Jun 2015 in reply to Dimo Link to this post

    Hi, Raddateinput does not display entered value  instead always displays mask.....

    Please help me

  10. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 18 Jun 2015 Link to this post

    Hello,

    Could you elaborate on your specific scenario and send us the definition of the picker control?

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017