javascript - How do I call for a modal window when clicking a date in an inline Jquery Datepicker? -
i've been searching solution while, , i'm bit of javascript noob, i'm having trouble writing around issue myself.
i've got inline datepicker identifying dates "events" using beforeshowday
paint alternate css styles. trouble trying produce modal popup when user clicks 1 of these specific dates. here code have:
<div style="display:none" id="dialog-modal"> <h1>this dialog content</h1> </div> $("#datepicker").datepicker({beforeshowday: highlightevents, onselect: showevent}); function highlightevents(date) { var events = new array(<cfoutput>#valuelist(eventdetailoutput.days)#</cfoutput>); var day = date.getdate(); if ($.inarray(day, events) == -1) return [true,""]; return [true, "eventdate"]; } function showevent(date) { var events = new array(<cfoutput>#valuelist(eventdetailoutput.days)#</cfoutput>); var day = date.getdate(); if ($.inarray(day, events) == -1) { $(function() { $( "#dialog-modal" ).dialog({modal: true}); }); } }
i hoping @ array in same way in highlightevents
function , produce modal window upon select.
Comments
Post a Comment