Regarding dateInput5 in Seaside. How a previously initialized date can be displayed in the form's dateInput5 widget. I use a pre-initialized date type value that is a property of the object to render on the form.
html label for: 'startDate'; with: 'Start Date: '. html dateInput5 on: #startDate of: self contract; id: 'startDate'; step: 1; title: 'Start Date'; value: self contrato startDate; required.
Widget don't render date initialized. I can't get it to show up.
Thanks, Oswall
Hi,
The native date input (input type="date"), will take a string value as input if formatted as yyyy-mm-dd (e.g. '2021-09-06').
html dateInput5 on: #startDate of: self contract; id: 'startDate'; step: 1; title: 'Start Date'; value: self contrato startDate yyyymmdd; required.
Best regards,
Esteban A. Maringolo
On Mon, Sep 6, 2021 at 2:22 PM Oswall Verny Arguedas C. sistecaq@gmail.com wrote:
Regarding dateInput5 in Seaside. How a previously initialized date can be displayed in the form's dateInput5 widget. I use a pre-initialized date type value that is a property of the object to render on the form.
html label for: 'startDate'; with: 'Start Date: '. html dateInput5 on: #startDate of: self contract; id: 'startDate'; step: 1; title: 'Start Date'; value: self contrato startDate; required.
Widget don't render date initialized. I can't get it to show up.
Thanks, Oswall
seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
On 9/6/21 10:22 AM, Oswall Verny Arguedas C. wrote:
html dateInput5 on: #startDate of: self contract; id: 'startDate'; step: 1; title: 'Start Date'; value: self contrato startDate; required.
If I recall, #on:of: needs to be called last, it closes the tag.
Hi,
You can check an example in WAHtml5InputTest
html dateInput5 on: #startDate of: self contract
…should be enough because #on:of: sends #value: itself
However, you should check to send a date in the correct format. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date There is no built-in conversion from a Date instance to a String. This needs to be handled by your code.
Hope this helps Johan
On 6 Sep 2021, at 19:22, Oswall Verny Arguedas C. sistecaq@gmail.com wrote:
Regarding dateInput5 in Seaside. How a previously initialized date can be displayed in the form's dateInput5 widget. I use a pre-initialized date type value that is a property of the object to render on the form.
html label for: 'startDate'; with: 'Start Date: '. html dateInput5 on: #startDate of: self contract; id: 'startDate'; step: 1; title: 'Start Date'; value: self contrato startDate; required.
Widget don't render date initialized. I can't get it to show up.
Thanks, Oswall
seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
seaside@lists.squeakfoundation.org