DateTimePicker Custom Time Interval

3 posts, 1 answers
  1. Kong
    Kong avatar
    2 posts
    Member since:
    Feb 2017

    Posted 23 Mar Link to this post

    I currently have the Date/Time picker set to a time interval of 240 minutes, which is 12:00AM, 4:00AM, 8:00AM, 12:00PM, 4:00PM, and 8:00PM.  I would like to only show 8:00AM and 8:00PM.  Is this achievable?

  2. Answer
    Martin
    Admin
    Martin avatar
    822 posts

    Posted 24 Mar Link to this post

    Hello,

    Please take a look at this how-to example. In your case the open handler would look something similar to this:

    $("#datetimepicker").kendoDateTimePicker({
        ....
        open: function (e) {
            if (e.view === "time") {
                e.sender.timeView.dataBind([
                  new Date(1970, 0, 1, 8),
                  new Date(1970, 0, 1, 20)
                ])
            }
        }
    });

    Regards,
    Martin
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Kong
    Kong avatar
    2 posts
    Member since:
    Feb 2017

    Posted 24 Mar in reply to Martin Link to this post

    Thank you Martin!
Back to Top