- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 06:09 AM
Hi All,
How to set the date time with the help of client scripts?
Is it possible to ser date and time without using Ajax call in the client script?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 06:30 AM
With this simple client script code we can set date and time to the Date/Time type field or variable
function onLoad() {
var dt = formatDate(new Date(), g_user_date_time_format);
alert(dt);
g_form.setValue("u_date", dt);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 11:32 PM
Thanks for the solution. I am new to NOW platform and the code snippet above worked for me.