We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to restrict users to only pick from calendar icon

samadam
Mega Sage

I have a date field which I want to restrict users from manually entering the values instead only use the calendar icon to pick. Is this possible?

1 ACCEPTED SOLUTION

Another approach is to use a UI Policy with Run scripts and On load checked, and Isolate script unchecked.  Use a script like this in the Execute if true box

function onCondition() {
	var $ = this.jQuery;
	$('input[id="table_name.field.name"]').attr('readonly', true);
}

 

View solution in original post

8 REPLIES 8

Do you want this restriction within Service Portal?

samadam
Mega Sage

On the portal. 

Another approach is to use a UI Policy with Run scripts and On load checked, and Isolate script unchecked.  Use a script like this in the Execute if true box

function onCondition() {
	var $ = this.jQuery;
	$('input[id="table_name.field.name"]').attr('readonly', true);
}

 

samadam
Mega Sage

Perfect, that worked. Thank you