$(input).kendoDateTimePicker({
  value: new Date()
});

Range selection


function startChange() {
  var startDate = start.value(),
      endDate = end.value();

  if (startDate) {
    startDate = new Date(startDate);
    startDate.setDate(startDate.getDate());
    end.min(startDate);
  } else if (endDate) {
    start.max(new Date(endDate));
  } else {
    endDate = new Date();
    start.max(endDate);
    end.min(endDate);
  }
}

function endChange() {
  var endDate = end.value(),
      startDate = start.value();

  if (endDate) {
    endDate = new Date(endDate);
    endDate.setDate(endDate.getDate());
    start.max(endDate);
  } else if (startDate) {
    end.min(new Date(startDate));
  } else {
    endDate = new Date();
    start.max(endDate);
    end.min(endDate);
  }
}

var today = kendo.date.today();

var start = $(input).kendoDateTimePicker({
  value: today,
  change: startChange,
  parseFormats: ["MM/dd/yyyy"]
}).data("kendoDateTimePicker");

var end = $(input).kendoDateTimePicker({
  value: today,
  change: endChange,
  parseFormats: ["MM/dd/yyyy"]
}).data("kendoDateTimePicker");

start.max(end.value());
end.min(start.value());

Colors

Sidebar

Layout