Mojolicious::Plugin::FormFieldsFromJSON::Date
version 1.00
# Mojolicious $self->plugin('FormFieldsFromJSON::Date'); $self->plugin('FormFieldsFromJSON' => { types => { date => 1, }, }); # Mojolicious::Lite plugin 'FormFieldsFromJSON::Date'; plugin 'FormFieldsFromJSON' => { types => { date => 1, }, };
Mojolicious::Plugin::FormFieldsFromJSON::Date is an extension for Mojolicious::Plugin::FormFieldsFromJSON to create date fields.
Mojolicious::Plugin::FormFieldsFromJSON::Date - Mojolicious Plugin
You can configure several things for the date fields:
selected
The date selected. Must be in ISO format, e.g.
2014-12-29
Default: "today"
format
Defines the order of the dropdowns.
%Y-%m-%d
is the default and this will create the "year"-dropdown first, then the "month"-dropdown and finally the "day"-dropdown.
future
Defines how many years in the future should be available. (Default: 5)
past
Defines how many years in the past should be available. (Default: 1)
The date fields is a collection of dropdowns to select a date.
This is an example for a very simple date field
Configuration:
[ { "name":"start", "future": 2, "past": 0, "format":"%d-%m-%Y" } ]
Mojolicious, Mojolicious::Guides, http://mojolicio.us, Mojolicious::Plugin::FormFieldsFromJSON.
Renee Baecker <reneeb@cpan.org>
This software is Copyright (c) 2018 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Mojolicious::Plugin::FormFieldsFromJSON::Date, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::FormFieldsFromJSON::Date
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::FormFieldsFromJSON::Date
For more information on module installation, please visit the detailed CPAN module installation guide.