Try ERPNext Buy Support Partners Foundation

Add_date function not working in custom page

I want to add date picker field in my custom page.
SO, i add bellow line in js file.

this.page.add_date(“from_date”, frappe.datetime.get_today());
But it’s not working . it’s show null error. I thinks the problem in default date.

I also try other field type link this.page.add_data(“input data”)/this.page.add_select(). which are working fine.
Will you guyz help me?