PDA

View Full Version : jquery datepicker issue



ianhaney
11-06-2015, 08:13 PM
Hi

I have a jquery datepicker in my website and it all works perfect in Firefox but for some reason it don't work in Chrome, I click on a day within the datepicker and it just closes the datepicker and does not add the date to the input field

Is really weird cause works perfect in Firefox, the code is below if someone can see if I am missing anything that needs to make it work in Chrome.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>

</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<link rel="stylesheet"href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/blitzer/jquery-ui.css"/>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>

<link rel="stylesheet" type="text/css" media="screen" href="css/styles.css" />

<script src="js/jquery.ui.timepicker.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery.ui.timepicker.css" />

<script>
$(function() {
$("#exrdate").datepicker({
showButtonPanel: true,
dateFormat: "yy/mm/dd",
showOn:"both"
});
});

$(function() {
$("#exstdate").datepicker({
showButtonPanel: true,
dateFormat: "yy/mm/dd",
showOn:"both"
});
});
</script>

<script>
$(document).ready(function() {
$('#exrtime').timepicker({
defaultTime: '12:00',
showLeadingZero: true,
showNowButton: true,
showCloseButton: true,
showDeselectButton: true,
showOn: 'both',
});

$('#exstime').timepicker({
defaultTime: '12:00',
showLeadingZero: true,
showNowButton: true,
showCloseButton: true,
showDeselectButton: true,
showOn: 'both',
});
});
</script>

</head>
<body>

<form action="" method="post" class="basic-grey">
<div>
<?php if ($id != '') { ?>
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<p>Repair ID: <?php echo $id; ?></p>
<?php } ?>

<br>
<strong>Customer Name:</strong> <input type="text" name="customer_name"
value="<?php echo $customer_name; ?>"/>
<br/>
<strong>Customer Email:</strong> <input type="text" name="customer_email"
value="<?php echo $customer_email; ?>"/>
<br>
<strong>Customer Phone:</strong> <input type="text" name="customer_phone"
value="<?php echo $customer_phone; ?>"/>
<br>
<strong>Computer Make:</strong> <input type="text" name="computer_make"
value="<?php echo $computer_make; ?>"/>
<br>
<strong>Computer Model:</strong> <input type="text" name="computer_model"
value="<?php echo $computer_model; ?>"/>
<br>
<strong>Assigned to Technician:</strong>
<select name="technician">
<option value="Phil Roskams">Phil Roskams</option>
<option value="Ian Haney">Ian Haney</option>
</select>
<br>
<strong>Repair Status:</strong>
<select name="status">
<option value="In Queue">In Queue</option>
<option value="Working on">Working on</option>
<option value="Awaiting Parts">Awaiting Parts</option>
<option value="Ready for Collection/Delivery">Ready for Collection/Delivery</option>
<option value="Complete">Complete</option>
</select>
<br>
<strong>Expected Repair Date:</strong> <input type="date" name="exrdate" value="<?php echo $exrdate; ?>" id="exrdate"/>
<br><br>
<strong>Expected Repair Time:</strong> <input type="time" name="exrtime" value="<?php echo $exrtime; ?>" id="exrtime"/>
<br><br>
<strong>Expected Start Date:</strong> <input type="date" name="exstdate" value="<?php echo $exstdate; ?>" id="exstdate" />
<br><br>
<strong>Expected Start Time:</strong> <input type="time" name="exstime" value="<?php echo $exstime; ?>" id="exstime"/>
<br><br>
<strong>Delivery Type:</strong>
<select name="deltype">
<option value="Customer Pickup">Customer Pickup</option>
<option value="Delivery">Delivery</option>
</select>
<br>
<strong>Comments:
<br>
<textarea name="comments">
<?php echo $comments; ?>
</textarea>
<br>
<strong>Repair Cost:</strong> <input type="text" name="cost"
value="<?php echo $cost; ?>"/>
<br>
<input type="submit" name="submit" value="Add/Update Repair Tracking" />
</div>
</form>
</body>
</html>


Thank you in advance

Ian