mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
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:
parent
e5e4e8143d
commit
b4642f6a25
1 changed files with 5 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue