Datepicker on a form

Permalink 2 users found helpful
Can someone tell me how I can add a datepicker to a standard C5 form please? Thanks.

cleverington
 
cartersch replied on at Permalink Reply
cartersch
You can use the datepicker that's included in jquery ui by adding first adding a class to your input textbox like:

<input type="text" name="some_date" class="datepicker" value=""/>


then in your javascript add something like:

$(document).ready(function(){
   $('.datepicker').datepicker();
});


now when the user places the cursor in this textbox a date box should appear.
cleverington replied on at Permalink Reply
cleverington
Thanks for the reply. I am affraid you are going to have to treat me like a 2 year old!

Where do I do all this stuff?
mdzoidberg replied on at Permalink Reply
mdzoidberg
Hi cleverington,

By standard C5 form do you mean the form block?
cleverington replied on at Permalink Reply
cleverington
That was my hope. I am not a great techie, so if I could get a datepicker working with the standard form block that would be fantastic.
Fernandos replied on at Permalink Reply
Fernandos
I made such a package. It works without errors. Will distribute it for free. Will probably upload it the next weeks, since I'm under heavy stress atm with work school and projects.
cleverington replied on at Permalink Reply
cleverington
Fernandos, that would be awesome, I will look out for it on this thread. Thanks so much.
ekrontech replied on at Permalink Reply
Hi
Did you ever get the date picker ?
Could you share ? (Please)
theamazingaustin replied on at Permalink Reply
Been trying to do this all day... not sure what to do... got close but still no cigar. If you could provide more info that would be fantastic! There seems to be no tutorials on how to modify the standard form for those of us who have just begun diving into the epicness of C5!
Thanks!!!

Edit: Oh snap just realized this is such an old thread!
mikefatty replied on at Permalink Reply
mikefatty
yeah please share, im also wodering how to add a datapicker:-)


/Mike
Erik74 replied on at Permalink Reply
When I add a datepicker in a block I use:
<div class="ccm-block-field-group">
   <h2>Date</h2>
   <?php echo Loader::helper('form/date_time')->date('date_field', $date_field); ?>
</div>
theamazingaustin replied on at Permalink Reply
Thanks Erik,
That's when you're using an external / custom form, not the included form block, correct?
The standard C5 form It does everything I need except date and time, or at least date. I didn't want to drop $30 on the extended form if I could just enable this functionality on the included form block, but am still trying to wrap my head around how to implement it...
theamazingaustin replied on at Permalink Reply
I can manage to get the datepicker to show up in the form, but it shows up in the form without selecting it in the menu, and it doesn't seem to pass on the value to the finished form...

Anyone have any more thoughts on how I can make this work?
mikefatty replied on at Permalink Reply
mikefatty
Hi Theamazinggaustin

I also stuck, hope somebody can help us! really need this for my client

Cheers

/Mike

:-)