Moonsoft Software Solutions

How to validate date ?

Started 29 Nov 2013 · 1 reply

  1. moon_1330
    Hi mate

    Should I set field type as "Text" or " Date" ?

    Should I type "date" in CSS field? It does not work when I set field type as "Date"

    Should I set Frontend Date format in Preferences tab as "%d-%m-%Y" ? but the result include the "%"

    I try everything above ,but even I type some random number ,say "456" , the email still can be sent without validation.

    Thank you
  2. Moonsoft support
    Hi,
    you can use both text or date and then add the validation. The type date will allow to display the calendar as a helper to fill the field. You can set as css on both cases 'date' or 'dateISO', this will validate the user typed text. Also if you use the type date and thus the calendar, you should also set the date format at preferences to ensure the day selected at the calendar is formatted the same way (so it will pass your validation). As date can be locale dependent, for dateISO you should set at format date

    yy/m/d

    (any characters other that the standard for years,months.. will be printed at the result, like / , - , or %)

    Hope this helps, regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket