0

Basically I got 2 calendar scripts from the same source. I saw a custom script before that merged these two but Everything I tried failed. Please help.
Here are the 2 scripts.
Script 1:

$('#date3').DatePicker({
    flat: true,
    date: ['2008-07-28','2008-07-31'],
    current: '2008-07-31',
    calendars: 3,
    mode: 'range',
    starts: 1
});

Script 2:

$('#inputDate').DatePicker({
    format:'m/d/Y',
    date: $('#inputDate').val(),
    current: $('#inputDate').val(),
    starts: 1,
    position: 'r',
    onBeforeShow: function(){
        $('#inputDate').DatePickerSetDate($('#inputDate').val(), true);
    },
    onChange: function(formated, dates){
        $('#inputDate').val(formated);
        if ($('#closeOnSelect input').attr('checked')) {
            $('#inputDate').DatePickerHide();
        }
    }
});

Please help, I have a deadline and my head is already hurting.

2
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by rexmatthew
0

Please help, I have a deadline and my head is already hurting.

I just came back from my short trip and my eyes are hurting now because I don't see any PHP code in your code which I'm not sure why post this in the PHP section in the first place?

You are merging 2 datepickers?

I notice that you didn't have a .each() function in your jQuery.

You can used .each() function to solve the issue you are having:

http://api.jquery.com/each/

In the future please double check where you post your code or noone will answer your thread.

0

I'm sorry.
I'll mark this solved since I found out what to do and what was missing.
Thanks though.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.