mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
allow to disable date widget with set_readonly on run-time
This commit is contained in:
parent
1a890a90f3
commit
4d80104403
@ -106,6 +106,20 @@ var et2_date = et2_inputWidget.extend(
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Dynamic disable or enable datepicker
|
||||
*
|
||||
* @param {boolean} _ro
|
||||
*/
|
||||
set_readonly: function(_ro)
|
||||
{
|
||||
if (this.input_date && !this.input_date.attr('disabled') != !_ro)
|
||||
{
|
||||
this.input_date.attr('disabled', !!_ro)
|
||||
.datepicker('option', 'disabled', !!_ro);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Set (full) year of current date
|
||||
*
|
||||
|
@ -83,7 +83,7 @@ egw.extend('calendar', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
if (!calendar_translated)
|
||||
{
|
||||
// Set template's icon for date popup - could probably use jquery-ui icons
|
||||
_egw.css(".et2_date input.hasDatepicker:hover", "background-image: url(" + egw().image('datepopup') + ")");
|
||||
_egw.css(".et2_date input.hasDatepicker:enabled:hover", "background-image: url(" + egw().image('datepopup') + ")");
|
||||
|
||||
translateCalendar();
|
||||
calendar_translated = true;
|
||||
|
Loading…
Reference in New Issue
Block a user