I do not think this is the best answer, but I found I could do this by disabling the datepicker initially, and then enabling it once it has been clicked on;
$(document).ready(function () {
initialiseEdit();
});
var initialiseEdit = function () {
// Disable the datepicker to ensure the datepicker is not shown when the page is loaded
$('#Assessment_SsipAccreditationDate').datepicker("disable");
// Class to stop the control from looking disabled
$('#Assessment_SsipAccreditationDate').addClass('inputBox');
};
// This code is to make the datepicker function as though it is enabled, whether it is or not.
$('.clickEnable').click(function () {
$('#Assessment_SsipAccreditationDate').datepicker("enable");
$('#Assessment_SsipAccreditationDate').datepicker("show");
});
Because '#Assessment_SsipAccreditationDate' is disabled, I had to wrap it with a span containing the clickEnable class and put the click event on that.