Is there a way to open date/time picker using a UI macro button ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 01:35 PM
I want to set the date/time value to a read only field which stores string values.
Thanks,
Shubham Patel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 02:35 PM
And you can have UI Policy/ onChange client script to keep both date field in sync.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 02:50 PM
I want a custom date field format for just one field and don't want to change it for all fields.
- var field_id = g_form.getControl('start_date').name;
- new GwtDateTimePicker(field_id, 'yyyy-MM-dd HH:mm:ss', true);
does't seem to work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 03:05 PM
That script was for catalog item...
Here it won't work because you have string field type and you are trying to make that field to act like datepicker, right ? for making any field as datepicker, you need to use "Datepicker" plugin.
If you want to make readOnly field then I would say don't display datepicker icon and just create onChange client script on "Installed" date and use below script to set field value:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.setValue('u_custom_string_field',g_form.getValue('closed_at'));
//Type appropriate comment here, and begin script below
}
If that don't work for you, I would say then please explain your use case with some example ?