Hello Community,

I finally managed to achieve what i was wanting with calendar.

Good calendar with date,time and seconds. (
http://www.rainforestnet.com/datetimepicker-tutorial.htm)

My code to use above calender in $this->Form->input is:

<?php
echo $this->Html->script('datetimepicker_css'); //(Actual
datetimepicker_css.js i have put under
C:\Projects\cakephp-1.3.7-0-g9f58309\app\webroot\js\datetimepicker_css.js)
?>
<p align="center"><?php echo 'Welcome ' .
$this->Session->read('Auth.User.first_name') . '.'; ?></p><p
align="right"><?php echo $this->Html->link('Logout', array('controller' =>
'users', 'action' => 'logout')); ?></p>
<b>Reports</b>
<?php
echo $this->Form->create(array('controller' => 'users', 'action' =>
'view'));
echo $form->input('StartDate',array('label'=>'StartDate','type'=>'text',
'onclick'=>"javascript:NewCssCal
('IncomingStartDate','yyyyMMdd','arrow',true,'24',true)"));
echo $form->input('EndDate',array('label'=>'EndDate','type'=>'text',
'onclick'=>"javascript:NewCssCal
('IncomingEndDate','yyyyMMdd','arrow',true,'24',true)"));
echo $this->Form->end('Search');
?>

Thanks all for your input and this is for some else as well if they want to
achieve the same.

Regards
Tapan Thapa
India

On Wed, Feb 23, 2011 at 9:02 PM, Tapan Kumar Thapa <
tapan.th...@hindustantimes.com> wrote:

> No i am sorry but i don't want to use ajax at all as i don't have much
> knowledge on this.
>
> I just to enable start and end date search via a calendar which should have
> date and time with seconds feature so i have found out jquery calendar (
> http://jqueryui.com/demos/). I want to implement this with cake form
> helper (or with any other method). Please suggest.
>
> Regards
> Tapan Thapa
> India
>
>
> On Wed, Feb 23, 2011 at 5:12 PM, Deividas J <jdeivi...@gmail.com> wrote:
>
>> if I understand you well you want to call action with .ajax. I do like
>> this:
>>
>> echo $this->Form->create(null, array(
>> 'default' => false,
>>  'inputDefaults' => array(
>> 'label' => false,
>> 'div' => false
>>  )
>> ));
>>
>> //----Input-------------
>>
>> echo $this->Form->input('StartDate', array(
>>      'type' => 'datetime',
>>     'dateFormat' => 'DMY',
>>     'minYear' => date('Y'),
>>     'maxYear' => date('Y'),
>>
>>     'timeFormat' => '24',
>>     'selected' => date('Y-m-d 0:00:s'),
>>     'attributes' => array(),
>>     'empty' => FALSE
>>         )
>> );
>> echo $this->Form->input('EndDate', array(
>>
>>     'type' => 'datetime',
>>     'dateFormat' => 'DMY',
>>     'minYear' => date('Y'),
>>     'maxYear' => date('Y'),
>>     'timeFormat' => '24',
>>
>>     //'selected' => null,
>>     'selected' => date('Y-m-d H:i:s'),
>>     'attributes' => array(),
>>     'empty' => FALSE
>>         )
>> );
>>
>> //----------------------
>>
>> echo $this->Form->end(array(
>> 'label' => 'Search',
>> 'id' => 'seach'
>> ));
>>
>> $this->Js->get('#seach')->event('click',
>> $this->Js->request(
>> array(
>>  'controller' => 'users',
>> 'action' => 'view',
>>  ),
>> array(
>> 'async' => true,
>>  'dataExpression' => true,
>> 'type' => 'json',
>>  'method' => 'post',
>> 'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)),
>>  'success' => 'renderTrack(data);',
>> )
>> ));
>>
>> I hope you looking  for this.
>>
>>
>>
>>
>> On Wed, Feb 23, 2011 at 1:33 PM, Tapan Kumar Thapa <
>> tapan.th...@hindustantimes.com> wrote:
>>
>>> Hello Community,
>>>
>>> Finally i have got one jquery based calendar.
>>>
>>> http://jqueryui.com/docs/Getting_Started
>>>
>>> how to from this site:
>>>
>>> <input type="text" name="date" id="date" />
>>>
>>> *JS:*
>>>
>>> $('#date').datepicker();
>>>
>>> My current code to select date with form helper is:
>>>
>>> echo $this->Form->create(array('controller' => 'users', 'action' => 
>>> 'view'));
>>>
>>>
>>>
>>> echo $this->Form->input('StartDate', array(
>>>     'type' => 'datetime',
>>>     'dateFormat' => 'DMY',
>>>     'minYear' => date('Y'),
>>>     'maxYear' => date('Y'),
>>>
>>>
>>>
>>>     'timeFormat' => '24',
>>>     'selected' => date('Y-m-d 0:00:s'),
>>>     'attributes' => array(),
>>>     'empty' => FALSE
>>>         )
>>> );
>>> echo $this->Form->input('EndDate', array(
>>>
>>>
>>>
>>>     'type' => 'datetime',
>>>     'dateFormat' => 'DMY',
>>>     'minYear' => date('Y'),
>>>     'maxYear' => date('Y'),
>>>     'timeFormat' => '24',
>>>
>>>
>>>
>>>     //'selected' => null,
>>>     'selected' => date('Y-m-d H:i:s'),
>>>     'attributes' => array(),
>>>     'empty' => FALSE
>>>         )
>>> );
>>> echo $this->Form->end('Search');
>>>
>>>
>>>
>>>
>>> Can anyone suggest how to use jave script calendar under form-create-input?
>>>
>>> Please suggest.
>>>
>>> Regards
>>> Tapan Thapa
>>> India
>>>
>>>
>>>
>>> On Tue, Feb 22, 2011 at 12:46 PM, andy_the ultimate baker <
>>> anandghaywankar...@gmail.com> wrote:
>>>
>>>> u cant expect all that u need will get exactly.
>>>> u need to change the format in its code.
>>>> have u tried the options at the right side of page ?
>>>> and bellow it the possible changes and functions are given just refer
>>>> them.
>>>>
>>>> Anand
>>>> cake developer
>>>> www.anshusys.com.
>>>>
>>>> On Feb 22, 12:01 pm, Tapan Kumar Thapa
>>>> <tapan.th...@hindustantimes.com> wrote:
>>>> > I have seen this web site but i think your suggested calendar does not
>>>> > provide seconds in calendar. Does it?
>>>> >
>>>> > Regards
>>>> > Tapan Thapa
>>>> > India
>>>> >
>>>> > On Tue, Feb 22, 2011 at 12:25 PM, andy_the ultimate baker <
>>>> >
>>>> > anandghaywankar...@gmail.com> wrote:
>>>> > > hi tapan,
>>>> > > this is the most light weight date picker with variety of option.
>>>> >
>>>> > > get this link
>>>> >
>>>> > >http://jqueryui.com/demos/datepicker
>>>> >
>>>> > > hope this may help u.
>>>> >
>>>> > > regards
>>>> >
>>>> > > Anand
>>>> > > cake developer
>>>> > >www.anshusys.com.
>>>> >
>>>> > > On Feb 22, 11:18 am, Walther <waltherl...@gmail.com> wrote:
>>>> > > > This is the one I use:http://tinyurl.com/6g2xokx
>>>> >
>>>> > > > It is incredibly powerful!
>>>> >
>>>> > > > On Feb 21, 5:58 pm, Tapan Kumar Thapa <
>>>> tapan.th...@hindustantimes.com>
>>>> > > > wrote:
>>>> >
>>>> > > > > Hello Community,
>>>> >
>>>> > > > > Can anyone suggest good light weight (with minimum
>>>> configuration)
>>>> > > calendar
>>>> > > > > picker which should have hour, min and seconds feature?
>>>> >
>>>> > > > > Regards
>>>> > > > > Tapan Thapa
>>>> > > > > India
>>>> >
>>>> > > --
>>>> > > Our newest site for the community: CakePHP Video Tutorials
>>>> > >http://tv.cakephp.org
>>>> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd
>>>> help
>>>> > > others with their CakePHP related questions.
>>>> >
>>>> > > To unsubscribe from this group, send email to
>>>> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
>>>> group
>>>> > > athttp://groups.google.com/group/cake-php
>>>>
>>>> --
>>>> 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
>>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>>> group at http://groups.google.com/group/cake-php
>>>>
>>>
>>>  --
>>> 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
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to