Merge pull request #200 from wjt/jquery

jqueryDayField: do nothing if <input type=date> supported
This commit is contained in:
Michael Snoyman 2012-01-10 02:02:10 -08:00
commit 5a6638ad18

View File

@ -84,13 +84,18 @@ jqueryDayField jds = Field
addScript' urlJqueryUiJs
addStylesheet' urlJqueryUiCss
addJulius [JULIUS|
$(function(){$("##{theId}").datepicker({
dateFormat:'yy-mm-dd',
changeMonth:#{jsBool $ jdsChangeMonth jds},
changeYear:#{jsBool $ jdsChangeYear jds},
numberOfMonths:#{mos $ jdsNumberOfMonths jds},
yearRange:"#{jdsYearRange jds}"
})});
$(function(){
var i = $("##{theId}");
if (i.attr("type") != "date") {
i.datepicker({
dateFormat:'yy-mm-dd',
changeMonth:#{jsBool $ jdsChangeMonth jds},
changeYear:#{jsBool $ jdsChangeYear jds},
numberOfMonths:#{mos $ jdsNumberOfMonths jds},
yearRange:"#{jdsYearRange jds}"
});
}
});
|]
}
where