ampersand-date-view2
A view module for user date input. This form displays all fields as inputs. Fork of https://github.com/mikehedman/ampersand-date-view which uses a select for month.
Last updated 5 years ago by thisjustin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ampersand-date-view2 
SYNC missed versions from official npm registry.

ampersand-date-view2 Build Status

An extension of ampersand-date-view and ampersand-input-view to create a three part date control.

This control renders month as an input. I f you want month as a select menu see the original ampersand-date-view.

install

npm install ampersand-date-view2

example

var FormView = require('ampersand-form-view');
var DateView = require('ampersand-date-view2');

module.exports = FormView.extend({
    fields: function () {
        return [
            new DateView({
              label: 'Birth date',
              value: this.model.birthDate || '',
              name: 'birthDate',
              yearMax: 2000
            }),
            ...
        ];
    }
});

opts

  • yearMin (defaults to 1900)
  • yearMax (defaults to 2100)

And all the standard options from ampersand-input-view

changelog

0.0.7 - removing hardcoded limitation on year 0.0.8 - Changes provided by @xicombd from @sinfo: added yearMin, yearMax constraints, demo, and lint cleanup 0.0.9 - (forked from ampersand-date-view) changed month field from select to input

credits

Thanks to the Ampersand group & Mike Hedman!

license

MIT

Current Tags

  • 0.0.9                                ...           latest (5 years ago)

1 Versions

  • 0.0.9                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (4)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |