angular-formly example: UI Bootstrap Datepicker

This is a very basic example of how to use the UI Boostrap datepicker with angular-formly.


Model Value

{}

Fields (note, functions are not shown)

[
  {
    "key": "date",
    "type": "datepicker",
    "templateOptions": {
      "label": "Date",
      "type": "text",
      "datepickerPopup": "dd-MMMM-yyyy"
    }
  }
]

Form

{
  "$error": {},
  "$name": "vm.form",
  "$dirty": false,
  "$pristine": true,
  "$valid": true,
  "$invalid": false,
  "$submitted": false,
  "formly_1": {
    "$error": {},
    "$name": "formly_1",
    "$dirty": false,
    "$pristine": true,
    "$valid": true,
    "$invalid": false,
    "$submitted": false,
    "formly_1_datepicker_date_0": {
      "$validators": {},
      "$asyncValidators": {},
      "$parsers": [
        null
      ],
      "$formatters": [
        null,
        null
      ],
      "$viewChangeListeners": [
        null
      ],
      "$untouched": true,
      "$touched": false,
      "$pristine": true,
      "$dirty": false,
      "$valid": true,
      "$invalid": false,
      "$error": {},
      "$name": "formly_1_datepicker_date_0",
      "$options": null
    }
  }
}
This is an example for the angular-formly project made with ♥ by Kent C. Dodds
This example is running angular version "1.4.4" and formly version "8.4.1"
Edit in JS Bin