No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Mojolicious/Plugin/FormFieldsFromJSON
t
.gitignore
.travis.yml
Changes
README.mkdn
dist.ini

README.mkdn

Build Status Kwalitee status GitHub issues

NAME

Mojolicious::Plugin::FormFieldsFromJSON::Date

VERSION

version 1.00

SYNOPSIS

# Mojolicious
$self->plugin('FormFieldsFromJSON::Date');
$self->plugin('FormFieldsFromJSON' => {
  types => {
    date => 1,
  },
});

# Mojolicious::Lite
plugin 'FormFieldsFromJSON::Date';
plugin 'FormFieldsFromJSON' => {
  types => {
    date => 1,
  },
};

DESCRIPTION

Mojolicious::Plugin::FormFieldsFromJSON::Date is an extension for Mojolicious::Plugin::FormFieldsFromJSON to create date fields.

NAME

Mojolicious::Plugin::FormFieldsFromJSON::Date - Mojolicious Plugin

CONFIGURATION

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)

DATE FIELDS

The date fields is a collection of dropdowns to select a date.

A simple date field

This is an example for a very simple date field

Configuration:

[
  {
    "name":"start",
    "future": 2,
    "past": 0,
    "format":"%d-%m-%Y"
  }
]

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us, Mojolicious::Plugin::FormFieldsFromJSON.

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Renee Baecker.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)