I have the following init code for the datepicker, but the default ‘Choose Date’ link is displayed, not the image. This is in an MVC project, but that shouldn’t affect anything to the best of my knowledge.
$(function () {
$(".date-picker").datePicker({
showOn: 'both',
dateFormat: 'dd-mm-yy',
changeMonth: true,
changeYear: true,
showOn: 'button',
buttonImage: '<%= Url.Content("~/Content/images/date_picker2.gif") %>',
});
The rendered buttonImage option looks like this:
buttonImage: '/Content/images/date_picker2.gif',
An img tag like this renders the image correctly:
<img src='<%= Url.Content("~/Content/images/date_picker2.gif") %>' />
ProfK – i use the datepicker inside a shared EditorTemplate and my code looks very similar to the above. here’s what I have under Views->Shared->EditorTemplates->DateTime.ascx:
[edit] – usage in view:
give it a try, see if it helps out any…
jim