NEW3.04.04 · Released 9 June 2022
NEWfinPOWER Connect
Released in
3.04.04
9 June 2022
  1. Opened10 Mar
  2. Closed10 Mar
  3. Released9 Jun
Article 19063 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);