Message format for DateTime Picker with Date Input

3 posts, 1 answers
  1. Prashant
    Prashant avatar
    10 posts
    Member since:
    Aug 2016

    Posted 19 Oct 2018 Link to this post

    Hi- I have DateTime picker with Date Input as true. I want to modify the text that is displayed in the placeholders for format "MM-dd-yyyy hh:mm tt"

    As per below example i set message for month as "__", day as "__' and year as "____" . My question is how i can set message for hh:mm and day period. So that my Place Holder looks like __-__-____ :__ __/__ and i can enter date with hours and minutes with AP/PM

    <input id="dateinput" /><script>

    $("#dateinput").kendoDateInput({

    format: "MM-dd-yyyy hh:mm tt",

    messages:{

    month:"____",

    year:"____",

    day:"__",

    }});</script>

  2. Prashant
    Prashant avatar
    10 posts
    Member since:
    Aug 2016

    Posted 19 Oct 2018 in reply to Prashant Link to this post

    Correction on above thread

    So that my Place Holder looks like "__-__-____ __:__ __"  and i can enter date with hours and minutes with AP/PM

  3. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    2379 posts

    Posted 23 Oct 2018 Link to this post

    Hi Prashant,

    Changing the other messages in the DateInput can be done using the same approach as the one you have in place. You need to set the messages for the hour, minute and dayperiod options explicitly. Check out the dojo below that shows how all messages in the DateInput can be customized.



    Regards,
    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top