Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

how to disable clicking of calendar after first click?

i am using an DHTML calendar in my application. on clicking a date ,there is a form submit action.

i want to disable the calendar after first click ,so that user can not click the other date before the form submit.

my code is

PHP Code

<?php 
<SCRIPT type="text/javascript">

    function 
dateChanged(calendar) 
    {
        
// Beware that this function is called even if the end-user only
        // changed the month/year. In order to determine if a date was
        // clicked you can use the dateClicked property of the calendar:
        
if (calendar.dateClicked) {
        
// OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
        
var y = calendar.date.getFullYear();
        var 
m = calendar.date.getMonth() + 1; // integer, 0..11
        
var d = calendar.date.getDate(); // integer, 1..31
        
var NewDate = y + "-" + m + "-" + d;
        
document.getElementById("<?=$mydata[FILTER]?>").value = NewDate;
        
submitForm();
    }
        
                                                    
                          
                        
        var 
tempDate = new Date(<?=$CalDate?>);
        Calendar.setup({
                flat        : "<?=$mydata[FILTER]?>_show_date",      // ID of the parent element
                flatCallback:dateChanged,                                             // our callback function
                weekNumbers:false,                                                 // Don't display week numbers
                date        : tempDate      
                        // Set calendar to start at selected date
            });
                        
        document.getElementById("<?=$mydata[FILTER]?>").value = '<?=$mydata[FILTER]?>';
</script> 


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Credit.Feb 7, 2016 01:35 AM 1 85 Feb 7, 2016 01:35 AM
Last Post: yayimamember
[DBMS] by c00perzzFeb 23, 2015 05:45 AM 1 206 Feb 23, 2015 05:45 AM
Last Post: szuszi2
[DBMS] by c00perzzJan 17, 2015 09:24 AM 9 445 Jan 17, 2015 09:24 AM
Last Post: stugz