diff --git a/README.md b/README.md index 3a36da0f..7f4915a2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Pikaday ![Pikaday Screenshot][screenshot] -**Production ready?** Since version 1.0.0 Pikaday is stable and used in production. If you do however find bugs or have feature requests please submit them to the [GitHub issue tracker][issues]. +**Production ready?** Since version 1.0.0 Pikaday is stable and used in production. If you do however find bugs or have feature requests please submit them to the [GitHub issue tracker][issues]. Also see the [changelog](CHANGELOG.md) @@ -50,7 +50,7 @@ var picker = new Pikaday({ field.parentNode.insertBefore(picker.el, field.nextSibling); ``` -For advanced formatting load [Moment.js][moment] prior to Pikaday: +For advanced formatting load [Moment.js][moment] prior to Pikaday: See the [moment.js example][] for a full version. ```html @@ -79,7 +79,7 @@ Pikaday has many useful options: * `bound` automatically show/hide the datepicker on `field` focus (default `true` if `field` is set) * `position` preferred position of the datepicker relative to the form field, e.g.: `top right`, `bottom right` **Note:** automatic adjustment may occur to avoid datepicker from being displayed outside the viewport, see [positions example][] (default to 'bottom left') * `reposition` can be set to false to not reposition datepicker within the viewport, forcing it to take the configured `position` (default: true) -* `container` DOM node to render calendar into, see [container example][] (default: undefined) +* `container` DOM node to render calendar into, see [container example][] (default: undefined) * `format` the default output format for `.toString()` and `field` value (requires [Moment.js][moment] for custom formatting) * `formatStrict` the default flag for moment's strict date parsing (requires [Moment.js][moment] for custom formatting) * `defaultDate` the initial date to view when first opened @@ -106,7 +106,7 @@ Pikaday has many useful options: ## jQuery Plugin -The normal version of Pikaday does not require jQuery, however there is a jQuery plugin if that floats your boat (see `plugins/pikaday.jquery.js` in the repository). This version requires jQuery, naturally, and can be used like other plugins: +The normal version of Pikaday does not require jQuery, however there is a jQuery plugin if that floats your boat (see `plugins/pikaday.jquery.js` in the repository). This version requires jQuery, naturally, and can be used like other plugins: See the [jQuery example][] for a full version. ```html @@ -126,7 +126,7 @@ $('.datepicker').eq(0).pikaday('show').pikaday('gotoYear', 2042); ## AMD support -If you use a modular script loader than Pikaday is not bound to the global object and will fit nicely in your build process. You can require Pikaday just like any other module. +If you use a modular script loader than Pikaday is not bound to the global object and will fit nicely in your build process. You can require Pikaday just like any other module. See the [AMD example][] for a full version. ```javascript @@ -134,7 +134,7 @@ require(['pikaday'], function(Pikaday) { var picker = new Pikaday({ field: document.getElementById('datepicker') }); }); ``` -The same applies for the jQuery plugin mentioned above. +The same applies for the jQuery plugin mentioned above. See the [jQuery AMD example][] for a full version. ```javascript @@ -272,11 +272,11 @@ You must provide 12 months and 7 weekdays (with abbreviations). Always specify w ### Timepicker -Pikaday is a pure datepicker. It will not support picking a time of day. However, there have been efforts to add time support to Pikaday. +Pikaday is a pure datepicker. It will not support picking a time of day. However, there have been efforts to add time support to Pikaday. See [#1][issue1] and [#18][issue18]. These reside in their own fork. -You can use the work [@owenmead][owenmead] did most recently at [owenmead/Pikaday][owen Pika] -A more simple time selection approach done by [@xeeali][xeeali] at [xeeali/Pikaday][xeeali Pika] is based on version 1.2.0. +You can use the work [@owenmead][owenmead] did most recently at [owenmead/Pikaday][owen Pika] +A more simple time selection approach done by [@xeeali][xeeali] at [xeeali/Pikaday][xeeali Pika] is based on version 1.2.0. Also [@stas][stas] has a fork [stas/Pikaday][stas Pika], but is now quite old diff --git a/index.html b/index.html index b6909a07..2e37c940 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@

What is this?

{ field: document.getElementById('datepicker'), firstDay: 1, - minDate: new Date(2000, 0, 1), + minDate: new Date(), maxDate: new Date(2020, 12, 31), yearRange: [2000,2020] }); diff --git a/pikaday.js b/pikaday.js index fb72dcf0..1636235e 100644 --- a/pikaday.js +++ b/pikaday.js @@ -281,6 +281,7 @@ renderDay = function(opts) { var arr = []; + var ariaSelected = 'false'; if (opts.isEmpty) { if (opts.showDaysInNextAndPreviousMonths) { arr.push('is-outside-current-month'); @@ -296,6 +297,7 @@ } if (opts.isSelected) { arr.push('is-selected'); + ariaSelected = 'true'; } if (opts.isInRange) { arr.push('is-inrange'); @@ -306,7 +308,7 @@ if (opts.isEndRange) { arr.push('is-endrange'); } - return '' + + return '' + '