Skip to content

Commit 702f227

Browse files
author
Duc Tri Le
committed
Merge pull request jquerytools#670 from duclet/480
Fix for issue jquerytools#480
2 parents 7c6634b + 6899ce4 commit 702f227

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
@@ -289,7 +289,12 @@
289289

290290
//{{{ pick
291291

292-
function select(date, conf, e) {
292+
function select(date, conf, e) {
293+
// If it is readonly, then we'll just close the calendar
294+
if (input.attr('readonly')) {
295+
self.hide(e);
296+
return;
297+
}
293298

294299
// current value
295300
value = date;
@@ -420,7 +425,7 @@
420425
*/
421426
show: function(e) {
422427

423-
if (input.attr("readonly") || input.attr("disabled") || opened) { return; }
428+
if (input.attr("disabled") || opened) { return; }
424429

425430
// onBeforeShow
426431
e = e || $.Event();

0 commit comments

Comments
 (0)