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

DayOfWeek

methods

Returns a new date object that is set with a particular day of the week.

Parameters:targetDateDate

The date to set the day of the week to.

dayOfWeekNumber

The day of the week to be set.

directionNumber

The direction that determines the day of the week to be set.

One (1) indicates the day after the current one (default value). Minus one (-1) indicates the day before the current one.

Returns:Date

A new date object that is set with a particular day of the week.

<script>
    var targetDate = new Date(2016,10,5,15,25,11);

/* The result can be observed in the DevTools(F12) console of the browser. */
	console.log(kendo.date.dayOfWeek(targetDate, 1, 1)); // Mon Nov 07 2016 15:25:11 GMT+0200 (FLE Standard Time)

/* The result can be observed in the DevTools(F12) console of the browser. */
	console.log(kendo.date.dayOfWeek(targetDate, 1, -1)); // Mon Oct 31 2016 15:25:11 GMT+0200 (FLE Standard Time)
</script>
Not finding the help you need?
Contact Support