Set Default date field value

Hey All,
I am trying to add default date to date field like 31-12-2999. but its showing error and saving the doctype.

Second thing is i trying to add_years to to_date field on the basis of from_date field but that is also showing me error.
Guys can you please help me with right path.

frappe.ui.form.on("Wage Rule Code", "after_save", function(frm){
	frm.set_value('to_date', frappe.datetime.add_years(frm.doc.from_date,99));


1 Like

Facing same problem. DId you find a way out?

yes i decrease the year 31-12-9999 to 31-12-2100
Now its working fine in my case