From 8b68fe052d622038b3d01a1a7c1a1f71c8541f95 Mon Sep 17 00:00:00 2001 From: Foxandxss Date: Wed, 23 Dec 2015 20:39:40 +0100 Subject: [PATCH] docs(datepicker): docs tune up Closes #5119 --- src/datepicker/docs/readme.md | 81 +++++++++++++++++++++++++++++------ 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/src/datepicker/docs/readme.md b/src/datepicker/docs/readme.md index a880dc5..71c25a5 100644 --- a/src/datepicker/docs/readme.md +++ b/src/datepicker/docs/readme.md @@ -13,77 +13,114 @@ The datepicker has 3 modes: ### uib-datepicker settings ### * `custom-class (date, mode)` + $ _(Default: `null`)_ - An optional expression to add classes based on passing a date and current mode. * `date-disabled (date, mode)` + $ _(Default: `null`)_ - An optional expression to disable visible options based on passing a date and current mode. * `datepicker-mode` + $ + C _(Default: `day`)_ - Current mode of the datepicker _(day|month|year)_. Can be used to initialize the datepicker in a specific mode. * `format-day` + C _(Default: `dd`)_ - Format of day in month. * `format-month` + C _(Default: `MMMM`)_ - Format of month in year. * `format-year` + C _(Default: `yyyy`)_ - Format of year in year range. * `format-day-header` + C _(Default: `EEE`)_ - Format of day in week header. * `format-day-title` + C _(Default: `MMMM yyyy`)_ - Format of title when selecting day. * `format-month-title` + C _(Default: `yyyy`)_ - Format of title when selecting month. * `init-date` + $ + _(Default: `null`)_ - The initial date view when no model value is specified. * `max-date` + $ + C _(Default: `null`)_ - Defines the maximum available date. * `max-mode` + $ + C + _(Default: `year`)_ - Sets an upper limit for mode. * `min-date` + $ + C _(Default: `null`)_ - Defines the minimum available date. * `min-mode` + $ + C + _(Default: `day`)_ - Sets a lower limit for mode. * `ng-model` + $ - The date object. Needs to be a Javascript Date object. + +* `ng-model-options` + $ + C + _(Default: `{}`)_ - + Supported properties: + * allowInvalid + * timezone * `shortcut-propagation` + $ + C _(Default: `false`)_ - An option to disable the propagation of the keydown event. * `show-weeks` + $ + C _(Default: `true`)_ - Whether to display week numbers. * `starting-day` + $ + C _(Default: `0`)_ - Starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday). @@ -92,72 +129,92 @@ The datepicker has 3 modes: Add the ability to override the template used on the component. * `year-rows` + $ + C _(Default: `4`)_ - Number of rows displayed in year selection. * `year-columns` + $ + C _(Default: `5`)_ - Number of columns displayed in year selection. -* `ng-model-options` - _(Default: `{}`)_ - - Supported properties: - * allowInvalid - * timezone - ### uib-datepicker-popup settings ### Options for the uib-datepicker must be passed as JSON using the `datepicker-options` attribute. This list is only for popup settings. +* `alt-input-formats` + $ + C + _(Default: `[]`)_ - + A list of alternate formats acceptable for manual entry. + * `clear-text` + C _(Default: `Clear`)_ - The text to display for the clear button. * `close-on-date-selection` + $ + C _(Default: `true`)_ - Whether to close calendar when a date is chosen. * `close-text` + C _(Default: `Done`)_ - The text to display for the close button. * `current-text` + C _(Default: `Today`)_ - The text to display for the current day button. * `datepicker-append-to-body` - _(Default: `false`)_ - + $ + C + _(Default: `false`, Config: `appendToBody`)_ - Append the datepicker popup element to `body`, rather than inserting after `datepicker-popup`. * `datepicker-popup-template-url` + C _(Default: `uib/template/datepicker/popup.html`)_ - Add the ability to override the template used on the component. * `datepicker-template-url` + C _(Default: `uib/template/datepicker/datepicker.html`)_ - Add the ability to override the template used on the component (inner uib-datepicker). * `is-open` + $ _(Default: `false`)_ - Whether or not to show the datepicker. * `on-open-focus` + $ + C _(Default: `true`)_ - Whether or not to focus the datepicker popup upon opening. * `show-button-bar` + $ + C _(Default: `true`)_ - Whether or not to display a button bar underneath the uib-datepicker. + +* `type` + C + _(Default: `text`, Config: `html5Types`)_ - + You can override the input type to be _(date|datetime-local|month)_. That will change the date format of the popup. * `uib-datepicker-popup` - _(Default: `yyyy-MM-dd`)_ - + C + _(Default: `yyyy-MM-dd`, Config: `datepickerConfig`)_ - The format for displayed dates. This string can take string literals by surrounding the value with backticks, i.e. ``yyyy-MM-dd h `o'clock` ``. - * `alt-input-formats` - _(Default: `[]`)_: - A list of alternate formats acceptable for manual entry. - ### Keyboard support ### Depending on datepicker's current mode, the date may refer either to day, month or year. Accordingly, the term view refers either to a month, year or year range.