Fairly new to asp.net Mvc and jquery.
Have the following code working fine, but I would like to load the image src every time the onSelect of the datepicker is fired. Any help much appreciated.
<script type="text/javascript">
$(function() {
$('#datepicker').datepicker({
onSelect: function(date,inst) {
alert(date)},
inline: true
});
});
</script>
<h2>Select a date to view the diary:</h2>
<div id="datepicker">
</div>
<div id ="diary">
<img src="<%=Url.Action("Image", new { id = DateTime.Now.ToString("dd-MM-yyyy") }) %>" alt="" />
</div>
1 Answer