date-field-test:_template

This is the test of the new dataform field type = date
( see also http://feedback.wikidot.com/wish:365/comments/show#post-1819761 )

Every registered Wikidot account can add/edit a page in this category!

form_data:

Date field 1: %%form_data{date-1}%%

Date field 1 (in form [[date %form_data{date-1}% format="%e %b %Y, %H:%M %Z"]]:

[[date %%form_data{date-1}%% format="%e %b %Y, %H:%M %Z"]]

Date field 2: %%form_data{date-2}%%)

Date field 2 (in form [[date %form_data{date-2}% format="%Y-%m-%d %T"]]:

[[date %%form_data{date-2}%% format="%Y-%m-%d %T"]]

Form_raw:

Date field 1: %%form_raw{date-1}%%

Date field 1 (in form [[date %form_raw{date-1}% format="%e %b %Y, %H:%M %Z"]]: [[date %%form_raw{date-1}%% format="%e %b %Y, %H:%M %Z"]]

Date field 2: %%form_raw{date-2}%%)

Date field 2 (in form [[date %form_raw{date-2}% format="%e %b %Y, %H:%M %Z"]]: [[date %%form_raw{date-2}%% format="%e %b %Y, %H:%M %Z"]]

—-
Using template page: _template

Using the Date format parameters - collected in http://community.wikidot.com/howto:frontforum-date-variable
——

+++ form_data:

Date field 1: @@%%form_data{date-1}%%@@

Date field 2: @@%%form_data{date-2}%%)@@

Date field 2: @@formatDate("yy-mm-dd",%%form_data{date-2}%%)@@

+++ Form_raw:

Date field 1: @@%%form_raw{date-1}%%@@

Date field 2: @@%%form_raw{date-2}%%)@@

Date field 2: @@formatDate("yy-mm-dd",%%form_raw{date-2}%%)@@

---
[[form]]
fields:
  date-1:
    label: Date field 1
    type: date
    options:
      changeYear: true
      yearRange: "1900:2020"
      dateFormat: "yy-mm-dd"
  date-2:
    label: Date field 2
    type: date
    options:
      showMonthAfterYear: true
      maxDate: "+1w"
      minDate: "-1d"
      showOn: "button"
      buttonImageOnly: true
[[/form]]

====
[[form]]
fields:
  date-1:
    label: Date field 1
    type: date
    options:
      changeYear: true
      yearRange: "1900:2020"
      dateFormat: "yy-mm-dd"
  date-2:
    label: Date field 2
    type: date
    options:
      showMonthAfterYear: true
      maxDate: "+1w"
      minDate: "-1d"
      showOn: "button"
      buttonImageOnly: true
[[/form]]