Use $.datepicker only when the web browser does not support <input type="date">

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12461 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2012-12-26 05:24:09 +00:00
parent e5e4e8143d
commit b4642f6a25

View file

@ -116,6 +116,9 @@
<script>
(function($){
$(function(){
$tmp = $("<input>").attr("type", "date");
if($tmp[0].type === "date") return;
var option = { changeMonth: true, changeYear: true, gotoCurrent: false,yearRange:'-100:+10', dateFormat:'yy-mm-dd', onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
@ -124,7 +127,8 @@
$(".inputDate").datepicker(option);
$(".dateRemover").click(function() {
$(this).prevAll('input').val('');
return false;});
return false;
});
});
})(jQuery);
</script>