Skip to content

Commit 6899ce4

Browse files
author
Duc Tri Le
committed
jquerytools#480: Fixing readonly bug
1 parent 46b8662 commit 6899ce4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/dateinput/dateinput.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,12 @@
274274

275275
//{{{ pick
276276

277-
function select(date, conf, e) {
277+
function select(date, conf, e) {
278+
// If it is readonly, then we'll just close the calendar
279+
if (input.attr('readonly')) {
280+
self.hide(e);
281+
return;
282+
}
278283

279284
// current value
280285
value = date;
@@ -405,7 +410,7 @@
405410
*/
406411
show: function(e) {
407412

408-
if (input.attr("readonly") || input.attr("disabled") || opened) { return; }
413+
if (input.attr("disabled") || opened) { return; }
409414

410415
// onBeforeShow
411416
e = e || $.Event();

0 commit comments

Comments
 (0)