Fetch today date when workflow change

i want to fetch today date in approvel_date when approved. my code is not working

Below is my code

  approvel: function(frm) {
                if(frm.doc.workflow_state =="Approved"){
                        cur_frm.set_value("approvel_date", get_today())

                }
                else{
                        cur_frm.set_value("approvel_date", "")
                }

        },

Hi @namgyal,

Please apply it.

frm.set_value("approvel_date", frappe.datetime.get_today());

Thank You!

@NCP Thanks, but its not working still.

Hi @namgyal,

Please check the concept in the client script doc.

Thank You!

@NCP Thanks.