Hi guys, I spent most of the day to give some datepickers a try.
I just wanted to get rid of the old JSCal. First I tried JSCal2, but the guy seems to want some 80 $ to run it and anyway I didn't suceed on the fly and gave up on it.
I went out looking for something else and found this:
Unobtrusive Date-Picker Widget V4
To install, copy the contents of the .zip file to {mossite}/includes/js/
For the "before form" script:
//
load the standard FacileForms library
$this->execPieceByName('ff_InitLib');
// include the javascript functions for dates
echo ('
<script type="text/javascript" src="{mossite}/includes/js/date-picker-v4/js/lang/de.js"></script>
<script type="text/javascript" src="{mossite}/includes/js/date-picker-v4/js/lang/en.js"></script>
<script language="javascript" src="{mossite}/includes/js/date-picker-v4/js/datepicker.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/date-picker-v4/css/datepicker.css">
');
Its pretty easy to trigger. Just add a text field and provide the class for the input. Thats it, the script does the rest and it looks amazing.
The only drawback I found so far, is the maxlength of the class input field in FacileForms itself, its set to 30. To call a calender with a lot of options, the classname could be very long and only the first 30 characters are saved. So I went about changing it here:
/administrator/components/com_facileforms/admin/element.html.php
search for this line:
<input type="text" size="30" maxlength="30" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>
and change to:
<input type="text" size="30" maxlength="120" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>
thats probably enough space.
Then you have to alter the corresponding field in the database, its also set to hold 30 chars. Its in the table "jos_facileforms_elements" the field name is "class2". Just set it to the same value you apllied to the maxlenghth.
Thats it, see it here:
East End Apartment
Maybe somebody could figure out howto pick the right localisation onload, from within FacileForms.
Cheers
Klaus