How to restrict users to only pick from calendar icon

samadam
Kilo 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
Kilo 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
Kilo Sage

Perfect, that worked. Thank you