An angular schema form - plugin to display datefields. This plugin uses the [Angular Combo Date Picker] (http://jfmdev.github.io/ngComboDatePicker/)
The easiest way is to install is with bower, this will also include dependencies:
bower install angular-schema-form-datefields --saveAs this plugin depends on the ngComboDatePicker, you will need to inject this dependency into your app.js
angular
.module('otesFormsApp', [
...
'ngComboDatePicker'
])
The datefields add-on adds a new form type, datefields.
| Form Type | Becomes |
|---|---|
| string | datefields |
| Schema | Default Form type |
|---|---|
| "type": "string" and "format": "datefields" | datefields |
maxDate is optional, as current year will be taken. Default order is "mdy" (Month Day and Year), dont pass anything if you are ok with this. Options are "ymd","mdy","dmy". Year Order default is ascending, dont pass anything if you are ok with this.
scope.schema = {
"type" : "object",
"properties": {
"DOB":{
"type":"string",
"title":"Date of Birth",
"format":"datefields",
"minDate": "1940-01-01",
"maxDate": "2017-01-01",
"order": "dmy",
"yearOrder": "desc",
"required" : "true",
"description": "Provide your date in Day / Month / Year format"
}
},
"required": ["DOB"]
};Released under the MIT License.