Disbale Implementation button till planned start date window arrives
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 06:17 AM
Logic to Disbale Implementation button till planned start date window arrives.
I have written below on load client script but it is not working
function onLoad() {
// Get the planned start date
var plannedStartDate = g_form.getValue('planned_start_date');
// Get the current date and time
var now = new Date();
// Convert planned start date to a Date object
var plannedStart = new Date(plannedStartDate);
// Check if the current date is before the planned start date
if (now < plannedStart) {
// Disable the Implement button
g_form.setActionDisabled('implement', true);
}
}