Setting the initial value of the DateTime control is not working. Try tried the following but both are not working... the current date is not displayed on the control.
hPanel {
spacing = 10
width = 50.perc
span("Date raised")
dateTime(
format = "DD-MM-YYYY",
value = Date(now())
).bind(TestIssue::dateRaised,
required = true,
requiredMessage = "This field is required",
)
}
hPanel {
spacing = 10
width = 50.perc
span("Date raised")
dateTime(
format = "DD-MM-YYYY",
) {
value = Date(now())
}.bind(TestIssue::dateRaised,
required = true,
requiredMessage = "This field is required",
)
}
Sorry, never mind. I realised I was setting the form values using an object just before displaying the form thereby overwriting value set in the form definition.
Setting the initial value of the DateTime control is not working. Try tried the following but both are not working... the current date is not displayed on the control.