DatePicker is not showing the date after selection

5 posts, 0 answers
  1. Kickinmhl
    Kickinmhl avatar
    1 posts
    Member since:
    Feb 2013

    Posted 27 Mar 2013 Link to this post

    It is the first time I am attempting to use the DatePicker, so excuse me in advance if I am just missing something basic, but here is the scenario.

    I am using a basic datePicker with a min and max value: (by the way, if I remove the min and max, i have the same problem)

        var periodDays = modelFromServer.DaysInPeriod.length;
        $("#dayPicker").kendoDatePicker({
            min: new Date(modelFromServer.DaysInPeriod[0].Date),
            max: new Date(modelFromServer.DaysInPeriod[periodDays - 1].Date)
        });

    When I select a day in the calendar, I would expect that day to show up in text next to the picker, but I have not been able to get it to show up there.  How do you set the displayed date?  See attached image for the picker.

    If I break and look at the value of   $("#dayPicker").data("kendoDatePicker").value()  i get the proper date that I selected.  It just won't fill in the text field next to the calendar icon.

    Any idea what I am doing wrong?

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 29 Mar 2013 Link to this post

    Hello,

     
    I prepared a simple jsBin demo in my attempt to replicate the issue, but to no avail. Let me know if I am missing something.

    All the best,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. James
    James avatar
    2 posts
    Member since:
    Aug 2013

    Posted 25 Feb 2014 in reply to Kickinmhl Link to this post

    This has probably already been resolved, however, here is one possible solution.

    If you used
    <div ID/Class="yourelement"></div>
    instead of
    <input id/class="yourelement" />
    The date will not show up in the Text area.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 26 Feb 2014 Link to this post

    Hello James,

    The DatePicker widget can only be initialized from an INPUT element. I will suggest you check the DatePicker Getting Started help topic, where you can find more information about the widget initialization.

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. James
    James avatar
    2 posts
    Member since:
    Aug 2013

    Posted 26 Feb 2014 in reply to Georgi Krustev Link to this post

    Yes,  I am aware, but thank you.
    I was just offering a reason for anyone else who came across this post if they were running into the same issue as @Kickinmhl.

    That using a <Div> instead of an <input> would cause what he saw.

    Thank you for clarifying though.
Back to Top
Kendo UI is VS 2017 Ready