|
1 | 1 | /*! @preserve |
2 | 2 | * bootbox.js |
3 | | - * version: 6.0.3 |
| 3 | + * version: 6.0.4 |
4 | 4 | * author: Nick Payne <nick@kurai.co.uk> |
5 | 5 | * license: MIT |
6 | 6 | * http://bootboxjs.com/ |
|
22 | 22 |
|
23 | 23 | let exports = {}; |
24 | 24 |
|
25 | | - let VERSION = '6.0.3'; |
| 25 | + let VERSION = '6.0.4'; |
26 | 26 | exports.VERSION = VERSION; |
27 | 27 |
|
28 | 28 | let locales = { |
|
93 | 93 | relatedTarget: null, |
94 | 94 | // The size of the modal to generate |
95 | 95 | size: null, |
96 | | - // A unique indentifier for this modal |
| 96 | + // A unique identifier for this modal |
97 | 97 | id: null |
98 | 98 | }; |
99 | 99 |
|
|
213 | 213 | exports.dialog = function(options) { |
214 | 214 | if ($.fn.modal === undefined) { |
215 | 215 | throw new Error( |
216 | | - '"$.fn.modal" is not defined; please double check you have included the Bootstrap JavaScript library. See https://getbootstrap.com/docs/5.1/getting-started/introduction/ for more details.' |
| 216 | + '"$.fn.modal" is not defined; please double check you have included the Bootstrap JavaScript library. See https://getbootstrap.com/docs/5.3/getting-started/introduction/ for more details.' |
217 | 217 | ); |
218 | 218 | } |
219 | 219 |
|
|
702 | 702 | }); |
703 | 703 | } |
704 | 704 |
|
705 | | - // These input types have extra attributes which affect their input validation. |
706 | | - // Warning: For most browsers, date inputs are buggy in their implementation of 'step', so this attribute will have no effect. Therefore, we don't set the attribute for date inputs. |
707 | | - // @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date#Setting_maximum_and_minimum_dates |
708 | | - if (options.inputType !== 'date') { |
709 | | - if (options.step) { |
710 | | - if (options.step === 'any' || (!isNaN(options.step) && parseFloat(options.step) > 0)) { |
711 | | - input.attr('step', options.step); |
712 | | - } else { |
713 | | - throw new Error('"step" must be a valid positive number or the value "any". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.'); |
714 | | - } |
| 705 | + if (options.step) { |
| 706 | + if (options.step === 'any' || (!isNaN(options.step) && parseFloat(options.step) > 0)) { |
| 707 | + input.attr('step', options.step); |
| 708 | + } else { |
| 709 | + throw new Error('"step" must be a valid positive number or the value "any". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.'); |
715 | 710 | } |
716 | 711 | } |
717 | 712 |
|
|
891 | 886 |
|
892 | 887 | // ...and replace it with one focusing our input, if possible |
893 | 888 | promptDialog.on('shown.bs.modal', function() { |
894 | | - // Need the closure here since input isn'tcan object otherwise |
| 889 | + // Need the closure here since input isn't an object otherwise |
895 | 890 | input.focus(); |
896 | 891 | }); |
897 | 892 |
|
|
1209 | 1204 |
|
1210 | 1205 | /*! @preserve |
1211 | 1206 | * bootbox.locales.js |
1212 | | - * version: 6.0.3 |
| 1207 | + * version: 6.0.4 |
1213 | 1208 | * author: Nick Payne <nick@kurai.co.uk> |
1214 | 1209 | * license: MIT |
1215 | 1210 | * http://bootboxjs.com/ |
|
0 commit comments