Need to populate date field as mandatory in service operations workspace pop up view

Prabhavathy3
Tera Contributor

Hi,
Can someone please help me to understand how we can use date field to be shown in pop up once some button is clicked in Service operations workspace view. What will be the type for date in workspace client script in UI action?
Below is the script which I have written but not working.
var fields = [{
type: 'Date',
name: 'date',
label: getMessage('Duration'),
mandatory: true
},
g_modal.showFields({
title: "Reason",
fields: fields,
size: 'lg'
}).then(function(fieldValues) {
g_form.setValue('date', fieldValues.updatedFields[0].value);
g_form.save();
});
}

Thanks,
Prabhavathy