You are viewing limited content. For full access, please sign in.

Question

Question

How do I set date ranges in a date field?

asked on March 28, 2022

I have a process owner who is asking for systematic enforcement of a rule that states trip requests cannot be scheduled more than 12 days in advance of the current date.

 

So the dates available would be the current date + 12 days. 

How do I set the dates available in the date picker?

0 0

Replies

replied on March 28, 2022

There is no out-of-box configuration for date field currently, you can use following JavaScript:

$(document).ready(function ()
{
// get current date
var d = new Date();

// set maximum date
var maxDate = moment(d.setDate(d.getDate() + 12)).format('YYYY-MM-DD');
$('.dateField input').attr('max',maxDate);
});

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.