Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 06:34 AM
Hi All,
I am stuck in a requirement that there are 2 fields in custom table, Date and Date value:
when date select on first field then second field must show highlighted behaviour.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 05:16 AM
Hi @Kumar887, try this code:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var dateField = 'u_date';
var stringField = 'u_format';
var dateValue = g_form.getValue(dateField);
var dateString = '';
if (dateValue) {
var date = new Date(dateValue);
var options = { year: 'numeric', month: 'long', day: 'numeric' };
dateString = date.toLocaleDateString('en-US', options);
}
g_form.setValue(stringField, dateString);
}
Please mark it Correct and Hit Like if you find this helpful!
ibrar
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 05:16 AM
Hi @Kumar887, try this code:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var dateField = 'u_date';
var stringField = 'u_format';
var dateValue = g_form.getValue(dateField);
var dateString = '';
if (dateValue) {
var date = new Date(dateValue);
var options = { year: 'numeric', month: 'long', day: 'numeric' };
dateString = date.toLocaleDateString('en-US', options);
}
g_form.setValue(stringField, dateString);
}
Please mark it Correct and Hit Like if you find this helpful!
ibrar