Welcome, Guest

How to change JS Calendar (J 1.0.x) into J 1.5
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to change JS Calendar (J 1.0.x) into J 1.5

How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 8 months ago #735

Hi,

Thirst: Great you guys re-injected live in facileforms!

There was a sample/tutorial in facile forms how to use the js calendar from joomla (1.0.x).

This used to be the code in 1.0.x:
Form Pieces
// include the javascript functions for dates

echo ('
<script language="JavaScript" src="{mossite}/includes/js/mambojavascript.js" type="text/javascript"></script>
<!-- import the calendar script -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/calendar.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/calendar/calendar-mos.css" title="green" />
');




Submit Pieces
// Get the date entered

$startdate = '';
$enddate = '';
foreach ($this->submitdata as $data)
    switch ($data[1]) {
        case 'StartDate'    : $startdate = date("Y-m-d",strtotime($data[4]));
                              break;
        case 'EndDate'    : $enddate = date("Y-m-d",strtotime($data[4]));
                              break;
        default        : break;
    } // switch
// Pop-up the entered value to show it has been read
echo ('
<script language="JavaScript">alert ("'.$startdate.' to '.$enddate.'");</script>

')



Text field (catching date) value:
<?php return date("Y-d-m"); ?>



And the script of the button:
// When button clicked, call the javascript function to show the calendar
// and pass the value back to the input text field.  

// NB: the value "StartDate" below must match the input text field name

function ff_SelectDate_action(element, action)
{
    switch (action) {
        case 'click':
            return showCalendar(ff_getElementByName('StartDate').id, 'dd-mm-y');
            break;
        default:;
    } // switch
} // ff_SelectDate_action



I thought I'd to change only the Form Pieces script into:
// include the javascript functions for dates

echo ('
<script language="JavaScript" src="{mossite}/includes/js/mambojavascript.js" type="text/javascript"></script>
<!-- import the calendar script -->

// this is the changed part:
<script type="text/javascript" src="{mossite}/includes/js/jscalendar-1.0/calendar-stripped.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/calendar/calendar-mos.css" title="green" />
');



But that won't help. Anybody any suggestions? I hope you'll understeand whta I mean, English isn't my native language.

Kind Regards,

Ruben

Original Form is downloadable @ www.esthervansanten.nl/downloads/verlofformulier.xml (Dutch). It works in J! 1.0.15
  • rubenl
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Last Edit: 3 years, 8 months ago by rubenl.

Re:How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 4 months ago #2341

Hi,

Did you manage to sort this out?

I am creating similar kind of form and will need calendar.

Thanks.
  • Khawaib Ahmed

Re:How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 4 months ago #2379

No, no solutions found yet.
  • rubenl
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0

Re:How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 2 months ago #3047

Greetings,
I just installed Breezing forms for J 1.5 and installed calendar package for old facile forms for J1.0.x.

I transfered one old form from joomla 1.0.x that used this date picker.

At first date picker didn't work, but i changed this code in EDIT FORM - FORM PIECES and now the form works ok.

<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en.js"></script>

to

<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en-GB.js"></script>

Greetings,
Hope it helps someone
  • sasa

Re:How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 2 months ago #3253

Hey, It helped me thanks!!..

One more issue though....

The calendar now works in the backend, but not in the frontend.
In front end I get "Error: 'Calendar' is undefined"

Any ideas??

Ta

D
  • jcm4101
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 0
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.43 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany