Click here to Skip to main content
15,910,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one calendar control in my webform ondblclick of datecell modalpopup should open...how to do this???


i have tried something in javascript am i correct???if not where am i wrong...


javascript::

XML
<script type="text/javascript">
    window.onload = function () {
        var timer;
        var el = document.getElementById('Calendar1');
        el.onclick = function () {
            if (timer) clearTimeout(timer);
            timer = setTimeout(function () { alert('<%= Calendar1.SelectedDate.Date.ToLongDateString() %>'); }, 250);
            document.getElementById("GridView1").style.display = 'block';
        }
        ondblclick = function Cal1() {
            clearTimeout(timer);
            alert('<%= Calendar1.SelectedDate.Date.ToLongDateString() %>'+"DoubleClick");
            document.getElementById("Mdl1").style.display = 'block';
        }
    }
</script>
Posted
Updated 15-Jul-15 19:31pm
v2
Comments
Sreekanth Mothukuru 16-Jul-15 2:15am    
Does onclick works with the above code? If yes, add ondblclick to your calendar control just like what you did for onclick.

el.ondblclick = function Cal1() { ...
Member 11686116 16-Jul-15 2:18am    
here am giving just alert message...it is working on anywhere click on calendarcontrol...but i want it on date cell???how to do that
Member 11686116 16-Jul-15 2:19am    
and it is not displaying gridview ??how to do this??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900