hjg
2024-07-09 30304784e82d4bba24121328da8eb8490aec4f4f
提交 | 用户 | 时间
58d006 1 Changelog
A 2 =========
3
4 1.2.0
5 -----
6
7 New features:
8 * Google Closure Compiler Compatibility
9 * Smart orientation by default, and explicit picker orientation with the `orientation` option
10 * Text inside the picker is no longer user-selectable
11 * Packagist/Composer support (I think...)
12 * No longer depends on glyphicons for arrows
13 * `clearDate` event added, fired when the date is cleared
14
15 Bug squashed:
16 * `noConflict` fixed
17 * Fix for large years causing an infinite loop in date parsing
18 * Fixed cases where `changeYear` and `changeMonth` events were not being triggered
19 * `component.js` moved to `bower.js`
20 * Falsey values for `startDate` and `endDate` translate to `-Infinity` and `Infinity`, respectively (effectively, falsey values mean "no bounds")
21 * Fixed `autoclose` for non-input, non-component elements
22 * Fixed 50% param in `mix()` less function -- expands compatibility with less compilers
23 * Fixed `update` method to update the selected date
24 * `beforeShowDay` was getting UTC dates, now it gets local dates (all dates that developers are given should be in local time, not UTC).
25 * `startDate` and `endDate` were a bit confused when given `new Date()` -- they would not allow today to be selected (the range should be inclusive), they would change whether it was selectable based on local time, etc.  These quirks should be fixed now.  They both also now expect local dates (which will then be time-zeroed and converted to UTC).
26 * Fixed selected date not being automatically constrained to the specified range when `setStartDate` and `setEndDate` were called.
27 * No longer uses jQuery's `.size()` (deprecated in favor of `.length`)
28 * `changeDate` triggered during manual user input
29 * `change` event fired when input value changed, it wasn't in some cases
30
31 Locale changes:
32 * Added Arabic, Norwegian, Georgian
33 * `clear` for French
34 * `today` and `clear` for Bahasa
35 * `today` and `clear` for Portuguese (both `pt` and `pt-BR`)
36 * `format` for Turkish
37 * `format` and `weekStart` for Swedish
38 * `format` and `weekStart` for Simplified Chinese; `today`, `format`, and `weekStart` for Traditional Chinese
39 * Fixed typo in Serbian latin (`rs-latin`)
40 * More appropriate use of Traditional Chinese habit in `zh-TW`
41
42
43 1.1.3
44 ----------
45
46 Clicking the clear button now triggers the input's `change` and datepicker's `changeDate` events.
47 Fixed a bug that broke the event-attached `format` function.
48
49
50 1.1.2
51 ----------
52
53 Botched release, no change from 1.1.1
54
55
56 1.1.1
57 ----------
58
59 Fixes a bug when setting startDate or endDate during initialization.
60
61
62 1.1.0
63 ----------
64
65 New features:
66 * Date range picker.
67 * Data API / noConflict.
68 * `getDate` and `setDate` methods.
69 * `format` method for events; this allows you to easily format the `date` associated with the event.
70 * New options:
71   * `beforeShowDay` option: a dev-provided function that can enable/disable dates, add css classes, and add tooltips.
72   * `clearBtn`, a button for resetting the picker.
73
74 Internal changes:
75 * Cleaner and more reliable method for extracting options from all potential sources (defaults, locale overrides, data-attrs, and instantiation options, in that order).  This also populates `$.fn.datepicker.defaults` with the default values, and uses this hash as the actual source of defaults, meaning you can globally change the default value for a given option.
76
77 Bugs squashed:
78 * Resolved a conflict with bootstrap's native `.switch` class.
79 * Fixed a bug with components where they would be stuck with a stale value when editing the value manually.
80 * The `date` attributes on events are now local dates instead of internal UTC dates.
81 * Separate `Date` objects for internal selected and view date references.
82 * Clicking multiple times inside inputs no longer hides the picker.
83
84 Minor improvements:
85 * Better text color for highlighted "today" date.
86 * Last year in decade view now marked as "new" instead of "old".
87 * Formats now properly handle trailing separators.
88
89 Locale changes:
90 * Added Albanian, Estonian, and Macedonian
91 * Added `weekStart` for Russian
92 * Added `weekStart` and `format` for Finnish
93
94 Potentially backward-incompatible changes:
95 * Options revamp:
96   * This fixes bugs in the correlation of some data-attrs to their associated option names.  If you use `data-date-weekstart`, `data-date-startdate`, or `data-date-enddate`, you should update these to `data-date-week-start`, `data-date-start-date`, or `data-date-end-date`, respectively.
97   * All options for datepicker are now properties on the datepicker's `o` property; options are no longer stored on the Datepicker instance itself.  If you have code that accesses options stored on the datepicker instance (eg, `datepicker.format`), you will need to update it to access those options via the `o` property (eg, `datepicker.o.format`).  "Raw" options are available via the `_o` property.
98
99 1.0.2
100 ----------
101
102 Small optimizations release
103
104 * Reduced the number of times `update` is called on initialization.
105 * Datepicker now detaches the picker dropdown when it is hidden, and appends it when shown.  This removes the picker from the DOM when it is not in use.
106 * No longer listens to document/window events unless picker is visible.
107
108 v1.0.1
109 ------
110
111 * Support for [Bower](http://twitter.github.com/bower/)
112 * Component pickers are now aligned under the input, not the add-on element.
113 * Japanese locale now has "today" and "format".
114 * "remove" method removes `.data().date` if the datepicker is on a non-input.
115 * Events on initialized elements are no longer blocked from bubbling up the DOM (jQuery.live et al can now catch the events).
116 * Component triggers now include `.btn` in addition to `.add-on`.
117 * Updates to README contents.
118
119 v1.0.0
120 ------
121
122 Initial release:
123
124 * format option
125 * weekStart option
126 * calendarWeeks option
127 * startDate / endDate options
128 * daysOfWeekDisabled option
129 * autoclose option
130 * startView / mnViewMode options
131 * todayBtn / todayHighlight options
132 * keyboardNavigation option
133 * language option
134 * forceParse option