Skip to content

Commit

Permalink
bug:2480
Browse files Browse the repository at this point in the history
datepicker need to use removeAttr jquery function to remove an attribute.

git-svn-id: http://piwigo.org/svn/trunk@12519 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
patdenice committed Oct 26, 2011
1 parent fa500d3 commit 458e49b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions themes/default/js/datepicker.js
Expand Up @@ -43,8 +43,8 @@ function pwg_common_initialization_datepicker(buttonImageName, day, month, year,
m = array_date[1];

// Init list
$(day + " option").attr("disabled", "");
$(month + " option").attr("disabled", "");
$(day + " option").removeAttr("disabled");
$(month + " option").removeAttr("disabled");

var daysInMonth = 32 - new Date(y, m - 1, 32).getDate();
$(day + " option:gt(" + (daysInMonth) +")").attr("disabled", "disabled");
Expand Down Expand Up @@ -77,15 +77,15 @@ function pwg_common_initialization_datepicker(buttonImageName, day, month, year,
$(month + " option:" + op_cmp + "(" + (m_cmp) +")").attr("disabled", "disabled");
if (op_cmp == "lt")
{
$(month + " option:eq(" + (0) +")").attr("disabled", "");
$(month + " option:eq(" + (0) +")").removeAttr("disabled");
}

if (m == m_cmp)
{
$(day + " option:" + op_cmp + "(" + (d_cmp) +")").attr("disabled", "disabled");
if (op_cmp == "lt")
{
$(day + " option:eq(" + (0) +")").attr("disabled", "");
$(day + " option:eq(" + (0) +")").removeAttr("disabled");
}
}
}
Expand Down

0 comments on commit 458e49b

Please sign in to comment.