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, 11 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, 11 months ago by rubenl.

Re:How to change JS Calendar (J 1.0.x) into J 1.5 3 years, 7 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, 7 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, 6 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, 5 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.40 seconds

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint