New to Kendo UI for jQueryStart a free 30-day trial

SetHours

methods

Returns a new date object with replaced time part from another date object.

Parameters:targetDateDate

The date object to replace the time part of.

sourceDateNumber

The date object that will be used for obtaining the time part.

Returns:Date

Returns a new date object with a replaced time part from another date object.

<script>
    var targetDate = new Date(2016,10,5,15,25,11);
    var sourceDateWithTime = new Date(2016,10,15,17,27,17);
    var dateWithNewTime = kendo.date.setHours(targetDate, sourceDateWithTime);
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(dateWithNewTime); // Sat Nov 05 2016 17:27:17 GMT+0200 (FLE Standard Time)
</script>
Not finding the help you need?
Contact Support