ASP.NET MVC3 / jQuery 1.9.1 / jQuery UI 1.10.2
I\'ve got a page on which I open a modal dialog after clicking on an Ajax.ActionLink
. Inside this dialog
btw i will try to explain the way i solved it, cause i think is easier this way.
im not an expert in this matters, so forgive me if I do not use the correct terms to explain it.
if u have 2 places in the same page u want to load datepicker, u got to duplicate the function:
$(function() {
$( "#datepicker" ).datepicker({
showOn: "button",
buttonImage: "images/calendar.png",
buttonImageOnly: true,
buttonText: "Select date",
addClass:".ccCFcalV2"
});
});
$(function() {
$( "#datepicker2" ).datepicker({
showOn: "button",
buttonImage: "images/calendar.png",
buttonImageOnly: true,
buttonText: "Select date",
addClass:".ccCFcalV2"
});
});
and add the class "datepicker2" to the second place u want to call the datepicker. it works, almost for me
Hope it helps someone, if u consider this a dumb solution, let me know and i'll remove it
have a nice day!
You can do this by adding a new function to div onclick="focusBlur()"
<script>
function focusBlur() {
$('input').blur();
}
</script>
initialize the datepicker on ajax success method.
If you need to show more than one time in the same view the calender and it only show's one time try this:
document.getElementById("div_Validade").onclick = function () { SetZIndex() };
function SetZIndex() {
document.getElementById("ui-datepicker-div").style.zIndex = "999999";
}
div_Validade
corresponds to the div id where the input is placed,
ui-datepicker-div
is infragistics element that is not shown.