Article Details
Id:19063
Product:finPOWER Connect
Type:NEW
Version:3.04.04
Opened:10/03/2022
Closed:10/03/2022
Released:09/06/2022
Job: J028427

HTML Widget; widget.UI.DateBox; Value property can now be set to either "now" or "today"

The HTML Widget DateBox can now have its value programmatically set to today's date by setting it to either "now" or "today", e.g.:

dateTestDate.Value("now");
dateTestDate.Value("today");

Getting the current date in a form that is compatible with the DateBox is more compilcated than expected since the DateBox expects a UTC version of the current "display" date, e.g.:

var date = new Date();
var now_utc =  Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
now_utc = new Date(now_utc);