Quantcast

Date picker for CakePHP 2.0.3

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Date picker for CakePHP 2.0.3

Florin Trifu
Hi

I need to implement a date picker into my application. I have found
this tutorial: http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery
but unfortunately is not working with my version. Did someone
succeeded to implement it or can someone guide me to another resource?

Thank you!

Best regards!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Jordan
Hi Florin,

You can use http://jqueryui.com/demos/datepicker/. It is really easy to implement no matter if you are using 1.x or 2.x

Just use the dateFormat option and configure it to match your database/validation rules.
$( ".selector" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );

Best, Jordan

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Florin Trifu
I have tried this but it doesn't work for me.

I have downloaded the jquery-ui, put the js inside /app/webroot/js, included inside my layout, and then create an input like this:

$this->Form->input('expire', array('id'=>'datepicker'))

Nothing happens when I click inside the text box...

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

ecsyle
You also need the jquery library, and will probably need to actually
write some javascript. It's easy:

<script>
$(function() {
        $("#datepicker").datepicker();
});
</script>

If you have done this, and are still getting errors, check your
javascript console to see what is going on.

On Nov 29, 9:35 am, Florin Trifu <[hidden email]>
wrote:
> I have tried this but it doesn't work for me.
>
> I have downloaded the jquery-ui, put the js inside /app/webroot/js,
> included inside my layout, and then create an input like this:
>
> $this->Form->input('expire', array('id'=>'datepicker'))
>
> Nothing happens when I click inside the text box...

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Florin Trifu
I forgot to tell you but jquery is also included. In the javascript console there is no error because the date-picker is not triggered.

Can you please tell me where should I put the script you told wrote me?

This one:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>

Thank you!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Jordan
You can put the script anywhere on the page. Anyway, better practice is to put it before the closing head tag of your layout view.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Florin Trifu
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

kebuno
In reply to this post by Florin Trifu
Just want to say: Many thanks guys!!!

Le mardi 29 novembre 2011 11:03:06 UTC+1, Florin Trifu a écrit :
Hi

I need to implement a date picker into my application. I have found
this tutorial: http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery
but unfortunately is not working with my version. Did someone
succeeded to implement it or can someone guide me to another resource?

Thank you!

Best regards!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

ummishafira
In reply to this post by Florin Trifu
i cant find where to download  http://docs.jquery.com/Downloading_jQuery 

On Tuesday, November 29, 2011 4:11:27 PM UTC-8, Florin Trifu wrote:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Simon Schneider
In reply to this post by Florin Trifu
Hey this worked perfectly for me, thanks a lot!!

Am Dienstag, 29. November 2011 11:03:06 UTC+1 schrieb Florin Trifu:
Hi

I need to implement a date picker into my application. I have found
this tutorial: http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery
but unfortunately is not working with my version. Did someone
succeeded to implement it or can someone guide me to another resource?

Thank you!

Best regards!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

paolo-8
In reply to this post by Florin Trifu
HELP! It worked fine with your step-by-step instructions, Florin. However, I'm building a "search" form where I need 2 different datepickers, but it's not working. 

I guess the problem is that two DOM elements can't have the same value in their ID attribute (which in this case is "datepicker")

any workarounds? Thanks in advance

El martes, 29 de noviembre de 2011 22:11:27 UTC-2, Florin Trifu escribió:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

paolo-8
In reply to this post by Florin Trifu
Nevermind! solved it, it's working now. 

I changed 

array('id'=>'datepicker', 'type'=>'text')

to

array('class'=>'datepicker', 'type'=>'text')


and then changed


<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>

to 

<script>
$(function() {
       $(".datepicker").datepicker();
});
</script>


this way, jQuery uses the class, not the ID, to find the fields where datepicker must be applied.

Regards!

El martes, 29 de noviembre de 2011 22:11:27 UTC-2, Florin Trifu escribió:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Thiago-3
In reply to this post by paolo-8

Use a class, not an ID...

Em 13/08/2012 21:04, "Paolo" <[hidden email]> escreveu:
HELP! It worked fine with your step-by-step instructions, Florin. However, I'm building a "search" form where I need 2 different datepickers, but it's not working. 

I guess the problem is that two DOM elements can't have the same value in their ID attribute (which in this case is "datepicker")

any workarounds? Thanks in advance

El martes, 29 de noviembre de 2011 22:11:27 UTC-2, Florin Trifu escribió:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Gian Carlo Asuncion
In reply to this post by Florin Trifu
Works like magic bro no more conflict on other components, keep sharing God Bless!

On Tuesday, November 29, 2011 4:11:27 PM UTC-8, Florin Trifu wrote:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Yen Hua Chuah
Hi
it does work but the default date format is mm/dd/yyyy. How can i change it to yyyy/mm/dd

please advise

thanks
chris

On Wednesday, January 23, 2013 3:53:30 PM UTC+8, Gian Carlo Asuncion wrote:
Works like magic bro no more conflict on other components, keep sharing God Bless!

On Tuesday, November 29, 2011 4:11:27 PM UTC-8, Florin Trifu wrote:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Isaac Rajaei
In reply to this post by Florin Trifu
Good job. 

You could use even time picker

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

April DeRossett
In reply to this post by Yen Hua Chuah
@Florin Trifu  Thanks for the instruction...Works perfectly!


@Yen Hua Chuah  You can set the date format here:

<script>
$(function() {
       $("#datepicker").datepicker({ dateFormat: "yy-mm-dd" });
});
</script>

Check out the API documentation...It is pretty nice.  http://api.jqueryui.com/datepicker/#option-dateFormat



On Thursday, February 21, 2013 1:25:13 AM UTC-6, Yen Hua Chuah wrote:
Hi
it does work but the default date format is mm/dd/yyyy. How can i change it to yyyy/mm/dd

please advise

thanks
chris

On Wednesday, January 23, 2013 3:53:30 PM UTC+8, Gian Carlo Asuncion wrote:
Works like magic bro no more conflict on other components, keep sharing God Bless!

On Tuesday, November 29, 2011 4:11:27 PM UTC-8, Florin Trifu wrote:
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Date picker for CakePHP 2.0.3

Pavel Schreiner
In reply to this post by Florin Trifu
Thank you for summary! :)


Dne středa, 30. listopadu 2011 1:11:27 UTC+1 Florin Trifu napsal(a):
Thank you very much! Indeed it worked.

Just to let the other users know in case they will have the same problem:

1. Download jquery (<a href="http://docs.jquery.com/Downloading_jQuery" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdocs.jquery.com%2FDownloading_jQuery\46sa\75D\46sntz\0751\46usg\75AFQjCNGOGI-vmhPef_aTkv3o4LXTYgr4yg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdocs.jquery.com%2FDownloading_jQuery\46sa\75D\46sntz\0751\46usg\75AFQjCNGOGI-vmhPef_aTkv3o4LXTYgr4yg';return true;">http://docs.jquery.com/Downloading_jQuery) and put the file in $project/app/webroot/js (e.q: $project/app/webroot/js/jquery.js)
2. Download jquery-ui (<a href="http://jqueryui.com/download" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fjqueryui.com%2Fdownload\46sa\75D\46sntz\0751\46usg\75AFQjCNEl07URyTSEfdUIE3-nu-lGyo8y7A';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fjqueryui.com%2Fdownload\46sa\75D\46sntz\0751\46usg\75AFQjCNEl07URyTSEfdUIE3-nu-lGyo8y7A';return true;">http://jqueryui.com/download); I, for example, downloaded a zip archive called: jquery-ui-1.8.16.custom.zip. From this archive you will have to copy the followings:

a. $archive_root/js/jquery-ui-*.js in $project/app/webroot/js (give it a shorter name e.q: jquery-ui.js)
b. $archive_root/css/smothness/* to $project/app/webroot/css (including the images; rename the css file to something shorter)

3. Include both js files in your layout. eq:

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->script(array('jquery',
                                        'jquery-ui'));

4. Include the css file. Eq

//$project/app/views/Layouts/default.ctp
-------------------------------------------------------------
echo $this->Html->css('jquery-ui.css');

5. Put this lines of code before calling the date-picker:

<script>
$(function() {
       $("#datepicker").datepicker();
});
</script>


6. Call the date picker in your form:

echo $this->Form->input('expire',
        array(
           'id'=>'datepicker',
           'type'=>'text'
        )


This is it!

Best regards!


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Loading...