Welcome Guest, Not a member yet? Register   Sign In
Datepicker jquery no view
#1

[eluser]Zimooon[/eluser]
Hi guys,

I loaded JqueryUI Datepicker and inserted it to my folders.
I don't get any errors , named all stuff right . But still when i click on the submit field the windows doesn't pop up.

Heres the code of head:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
  &lt;head&gt;
    &lt;title&gt;News Admin&lt;/title&gt;
    &lt;link rel="icon" href="/_/favicon.ico" type="/_/img/x-icon" /&gt;
    &lt;link rel="shortcut icon" href="/_/favicon.ico" type="/_/img/x-icon" /&gt;
    &lt;link rel="stylesheet" type="text/css" media="screen" href="/_/css/ui-lightness/jquery-ui-1.8.11.custom.css" /&gt;
   [removed][removed]
    [removed][removed]
....


and here is my view where i want to get the datepicker:

Code:
&lt;?php
    include('inc/inc-html-admin-start.php');
?&gt;



&lt;?php $this->load->helper('form'); ?&gt;
    <a name="anchorContent"></a>
    <div id="content">
    <h1>Administration - News bearbeiten</h1>    
    
    [removed]
    $(function() {
        $("#updateform").datepicker();
    });
[removed]
    
&lt;?php echo form_open('crud/update/'.$id); ?&gt;


    <p> Datum
        &lt;?php echo form_input('date'); ?&gt;
    </p>  
    
    <p>
        &lt;?php echo form_submit('submit', 'Editieren'); ?&gt;
    </p>


&lt;?php echo form_close(); ?&gt;



&lt;?php
    include('inc/inc-html-admin-end.php');
?&gt;
The view is called updateform();

Any1 got an idea?
#2

[eluser]Zimooon[/eluser]
i managed it to view the popup.

now another problem Sad

Code:
[removed]
    $(function() {
        $("#date").datepicker();
    });
    [removed]
For this:

&lt;input type="text" id="date" name="date" &gt; -> works

&lt;?php echo form_input('date'); ?&gt; -> dont work

Biggest thing is that the date of the html form above doesnt get write to my database.
php form does but dont get the jsplugin.
#3

[eluser]cahva[/eluser]
It doestn work because with only that, there's no id for the input field and $("#date").datepicker() is referring to id called "date". To add id, you can do it like this:
Code:
echo form_input('date','','id="date"');

// Or with an array
echo form_input(
    array(
        'name' => 'date',
        'id' => 'date'
    )
);
Userguide is your friend also with this.
#4

[eluser]Zimooon[/eluser]
allright thank you cahva . I tried this out too but it didn't work. After you posted this i looked things up and found out that german date format is 01.04.2010 and my database didn't accept 01/04/2010 like the standard of english datepicker is Big Grin

thanks again
have a nice day




Theme © iAndrew 2016 - Forum software by © MyBB