Recurring values
Disable recurring days, set marked or colored days with the help of the recurring object. Learn how to configure daily, weekly, monthly and yearly recurring dates and pass a rule in the recurring property under the invalid option. Exceptions for specific and recurring days can be configured.
Use the configurator to experiment, build strings and objects that you can grab and use.
Demo
The event will be repeated every day or every x days, depending on the value
The event will be repeated every x weeks on specific weekdays
The event will be repeated every x month on specific day of the month
The event will be repeated every x years on specific day of a specific month
The event will be repeated every x month on the specified nth weekday of the month
The event will be repeated every x years on the specified nth weekday of the specific month
The event will be repeated every day or every x days, depending on the value
The event will be repeated every x weeks on specific weekdays
The event will be repeated every x month on specific day of the month
The event will be repeated every x years on specific day of a specific month
The event will be repeated every x month on the specific nth weekday of the month
The event will be repeated every x years on the specific nth weekday of the specific month
// JS Object
recurring: {
repeat: 'daily ',
count: 1 ,
until: ' ',
pos: ,
weekDays: ' ',
day: ,
month: ,
interval: 1
}
// RRULE String
recurring: 'FREQ= ;COUNT= ; UNTIL= ; BYSETPOS= ; BYDAY= ; BYMONTHDAY= ; BYMONTH= ; INTERVAL=1 '
recurringException: [ ], // Exact dates can only be passed in an array
// JS Object
recurringExceptionRule: {
repeat: 'monthly ',
count: 1 ,
until: ' ',
pos: ,
weekDays: ' ',
day: 1 ,
month: ,
interval: 1
}
// RRULE String
recurringExceptionRule: 'FREQ= ;COUNT= ; UNTIL= ; BYSETPOS= ; BYDAY= ; BYMONTHDAY= ; BYMONTH= ; INTERVAL=1 '
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
$(function () {
$('#demo')
.mobiscroll()
.datepicker({
controls: ['date'],
display: 'inline',
invalid: [
{
recurring: {
repeat: 'daily', // Possible values: 'daily', 'weekly', 'monthly', 'yearly'
from: '2020-12-01', // The start date of the occurrences
until: '2021-01-31', // The end date of the occurrences
},
recurringException: ['2020-12-30', new Date(2020, 11, 31)], // Can contain string or date object
recurringExceptionRule: {
repeat: 'monthly',
day: 10,
},
},
{
recurring: {
repeat: 'weekly',
weekDays: 'SA', // Comma separated list of the week days, possible values: 'SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'
interval: 2, // The time interval for the rule (every 2 weeks in this example)
},
},
{
recurring: {
repeat: 'monthly',
day: 15,
count: 12, // The number of occurrences
},
},
{
recurring: {
repeat: 'yearly',
day: 1,
month: 1,
},
},
],
});
});
<div id="demo"></div>