Article Details
Id:19067
Product:finPOWER Connect
Type:NEW
Version:3.04.04
Opened:08/03/2022
Closed:24/03/2022
Released:09/06/2022
Job: J028415

HTML Widgets; widget.UI.GetInputDate() method added to display a message box where the user can enter a date

The following method has been added to the widget.UI object:

  • GetInputDate

This allows the user to enter a date.

This method takes the following parameters:

  • message (plain text or HTML)
  • options (object)
    • allowBlank (optional, Boolean)
    • title (optional)
    • messageIsHtml (optional, Boolean)
    • value (optional, either a Date value or the text "now" or "today")
  • okCallback
    • A function that is called when the "OK" button is clicked. This is passed a single "value" parameter which is either a Date value or null if the user has not entered a date.
  • cancelCallback
    • A function that is called if the "Cancel" button is clicked.
var options = {
   allowBlank: false,
   messageIsHtml: true,
   title: "Test Date Entry",
   value: "today",
};

widget.UI.GetInputDate("enter a <b>sample</b> date.", options, function(value) {
  window.alert("date entered: " + value);
},

function () {
  window.alert("cancelled");
});