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){
if(frm.doc.from_date){
frm.set_value('to_date', frappe.datetime.add_years(frm.doc.from_date,99));
}
});