mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="script/common.css">
|
|
<script src="script/common.js"></script>
|
|
<script>
|
|
function patch_date(f){
|
|
var NativeDate = window.Date;
|
|
var date = function date(y,m,d,h,i,s,j){
|
|
switch(arguments.length){
|
|
case 0: return date.now ? new NativeDate(date.now) : new NativeDate();
|
|
case 1: return new NativeDate(y);
|
|
case 2: return new NativeDate(y,m);
|
|
case 3: return new NativeDate(y,m,d);
|
|
case 4: return new NativeDate(y,m,d,h);
|
|
case 5: return new NativeDate(y,m,d,h,i);
|
|
case 6: return new NativeDate(y,m,d,h,i,s);
|
|
case 7: return new NativeDate(y,y,m,d,h,i,s,j);
|
|
}
|
|
};
|
|
date.UTC = NativeDate.UTC;
|
|
return function(){
|
|
Array.prototype.push.call(arguments, date);
|
|
window.Date = date;
|
|
res = f.apply(this, arguments);
|
|
window.Date = NativeDate;
|
|
}
|
|
}
|
|
var setup = patch_date(function setup(Date){
|
|
Date.now = new Date(2013, 2, 18);
|
|
$('input').datepicker({
|
|
todayHighlight: true
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body data-capture="input, .datepicker">
|
|
<div class="span4">
|
|
<input type="text" value="03/03/2013">
|
|
</div>
|
|
<div class="span4">
|
|
<input type="text" value="03/18/2013">
|
|
</div>
|
|
</body>
|
|
</html>
|