Hide calendar shortcuts when input is disabled
[ais.git] / www / DateTimeShortcuts.js
index c12dde28aa83150f3f9cd8299e7a68c5a1133e0b..a3c63c0cc0aab1857401170f6e1f587687cf6b6e 100644 (file)
@@ -130,6 +130,12 @@ var DateTimeShortcuts = {
 
         // Shortcut links (calendar icon and "Today" link)
         var shortcuts_span = document.createElement('span');
+       // Nirgal HACK starts
+       shortcuts_span.setAttribute('id', 'spancalshort_'+num);
+       //alert(''+inp.getAttribute('disabled'));
+       if (inp.getAttribute('disabled') != null)
+               shortcuts_span.style.display = 'none';
+       // Nirgal HACK ends
         inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
         var today_link = document.createElement('a');
         today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);');