Wednesday 8 May 2013

Event Based calendar with Javascript

<html>
    <head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/date.js"></script>
<script type="text/javascript" src="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/jquery.datePicker.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/styles/datePicker.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/styles/datePicker.css">

<script type="text/javascript" charset="utf-8">
    $(function()
            {
                $('.date-pick').datePicker()
                $('#start-date').bind(
                    'dpClosed',
                    function(e, selectedDates)
                    {
                        var d = selectedDates[0];
                        if (d) {
                            d = new Date(d);
                            $('#end-date').dpSetStartDate(d.addDays(1).asString());
                        }
                    }
                );
                $('#end-date').bind(
                    'dpClosed',
                    function(e, selectedDates)
                    {
                        var d = selectedDates[0];
                        if (d) {
                            d = new Date(d);
                            $('#start-date').dpSetEndDate(d.addDays(-1).asString());
                        }
                    }
                );
            });
</script>
    </head>
    <body>
        <ol>
                        <li><label for="start-date">Start date:</label>
            <input name="start-date" id="start-date" class="date-pick" /></li>
                        <li><label for="end-date">End date:</label>
            <input name="end-date" id="end-date" class="date-pick" /></li>   
        </ol>
    </body>
</html>

No comments:

Post a Comment

List OF BANK PAN Numbers

List OF BANK PAN Numbers Bank/Home Loan Providers PAN Number Allahabad Bank AACCA8464F Andhra Bank AABCA7375C Axis Bank...