Welcome Guest, Not a member yet? Register   Sign In
calendar problem
#1

[eluser]italoc[/eluser]
i have some problem with calendar plugin, this is my code
Code:
<?php
echo js_calendar_script('my_form');
js_calendar_write('entry_date', time(), true);
?>
<form action="http://localhost:8888/geodepliant/index.php/geodepliant/registration" name="my_form" method="post">
<input type="text" name="entry_date" id="calentry_date"  value="" onblur="update_calendar(this.name, this.value);" />
<p><a href="[removed]void(0);">Oggi</a></p>
&lt;/form&gt;

but when i click on input field doesn't work

anyone can help me???

thanks
#2

[eluser]halwaraj[/eluser]
What do you have in update_calendar()?

Post it as well. May be it might have some clue.
#3

[eluser]TheFuzzy0ne[/eluser]
Looks like you're missing an echo before the call to js_calendar_write().

Also, js_calendar_script('my_form') should be echoed in the head of your document.
#4

[eluser]italoc[/eluser]
with the echo js_calendar_write('entry_date', time(), true); now i see the calander, but if cechk the date i receive this javascript error:

Quote:insert_date is not defined
[Break on this error] insert_date(cal);

ps.: the calander is always visible it is nomal?

it is possible to show the calendar only when date filed is clikked?

thanks..
#5

[eluser]himself[/eluser]
Just for reference.
The insert_date function is commented out in js_calendar_pi (around line 483)

So just uncomment, or even better (don't tamper with the core) add the following to your &lt;head&gt; section (inside script tags which gets removed here)
Code:
function insert_date(cal)
{
    cal = eval(cal);
    fval = eval("document." + form_name + "." + cal.id);    
    
    if (fval.value == '')
    {
        fval.value = cal.date_str('y');
    }
    else
    {
        time = fval.value.substring(10);
        new_date = cal.date_str('n') + time;
        fval.value = new_date;
        
    }    
}




Theme © iAndrew 2016 - Forum software by © MyBB