How to make client scipt work

hello…
i want to restrict usrs form creating to-do in past and i am using script given by erpnext guys but its not working…

so i need to restart server or bench for client scripts to work…

or do i need to use custom script ?
pls hlp