date time format issue MM/DD/YYYY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 04:48 AM
Hi All,
we have requirement for a particular field which is date and type and we want that should in MM/DD/YYYY in this format only not user can change it according to there preference for that particular filed how we can achieve that

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 08:25 AM
You could add a client script that runs after that field is changed and throws an error. You would also have to add an onSubmit client script to prevent them from saving it if it is in the wrong format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 09:52 PM
But I am getting error - onChange script error: RangeError: Maximum call stack size exceeded function () { [native code] }
Kindly help me with this bellow is the code

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 06:18 AM
Can you try something like this?
var edate = new Date(newValue);
var formattedDateTime = edate.format('yyyy-MM-dd hh:mm tt');
g_form.setValue('u_start_date', formattedDateTime);