TOPIC:

Re: Calendar Button 11 years 11 months ago #19810

  • goshmac's Avatar
  • goshmac
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Karma: 5
  • Thanks: 0
Hi Yannick!

Please download the zip right here .

now you unzip the whole directory and upload it to your website ('/includes/js/date_picker_widget_v5').

then go to your breezing form, form->Properties->FormPieces->Before Form.

Insert the following code-lines:
// include the javascript functions for dates
echo ('
  <script type="text/javascript" src="{mossite}/includes/js/date_picker_widget_v5/js/lang/en.js"></script>
  <script language="javascript" src="{mossite}/includes/js/date_picker_widget_v5/js/datepicker.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/date_picker_widget_v5/css/datepicker.css">
');

1. then go to your form.
2. look for the textboxes you want to assign a calendar-button and keep the script-id in mind.
3. create a new element( Type static/Html ).

Insert the following lines of code into the main-textbox (choose 'html'-sourcecode):
<script type="text/javascript">// <![CDATA[
datePickerController.createDatePicker({formElements:{"ff_elem##your-textbox-script-id##":"d-sl-m-sl-Y"}});
// ]]></script>



4. Save your changes.

Now you should see a little calendar button next to your textbox ;)

There are many ways to modify the calendar. Just go to the above mentioned page!

greetings
matthias

Please Log in or Create an account to join the conversation.

Last edit: Post by goshmac.

Re: Calendar Button 11 years 10 months ago #21736

  • kabatza
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Good method!!

I have been using this calendar for a bit now.....I use alternative method

i use the "form->Properties->FormPieces->Before Form" as above......
then go to your breezing form, form->Properties->FormPieces->after Form.

and I put this:
echo ('
<script type="text/javascript">
var opts = {
formElements:{"xxxxxxx":"d-sl-m-sl-Y"},
statusFormat:"l-cc-sp-d-sp-F-sp-Y",
};
datePickerController.createDatePicker(opts);
</script>
');

** Where xxxxxxx is the id of the element I attach the date picker.

Now I wanted to make it a bit simpler, and create actionscripts for future use....
but I dont seem to be getting it right!

I tried replacing
formElements:{"xxxxxxx":"d-sl-m-sl-Y"},

with this
formElements:{"ff_elem ff_getIdByName(nnnnnnnnn)":"d-sl-m-sl-Y"}
***where nnnnnnnnn is the element name

it did not work.......Im sure I'm very close, but I'm missing something.

any sugestions??????

Please Log in or Create an account to join the conversation.

Re: Calendar Button 11 years 10 months ago #21739

  • kabatza
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
correction
formElements:{"ff_getIdByName('nnnnnnnnn')":"d-sl-m-sl-Y"}

dont seem to work.....

Please Log in or Create an account to join the conversation.

Last edit: Post by kabatza.

Re: Calendar Button 11 years 10 months ago #21789

  • goshmac's Avatar
  • goshmac
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Karma: 5
  • Thanks: 0
Hi!

Did you try ff_getElementByName instead of ff_getIdByName?

matthias

Please Log in or Create an account to join the conversation.

Re: Calendar Button 11 years 10 months ago #21793

  • tdemnati
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Hi Both,

Do you know is there is a way to replace the joomla calendar and use date-picker-v5 without attaching it to an element like a text box?

Your methods look good but wouldn't it be simpler to just replace the use of Joomlas default calendar?

Cheers,

Tarik

Please Log in or Create an account to join the conversation.

Re: Calendar Button 11 years 10 months ago #21797

  • kabatza
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Hi, and thanks for the reply :)

I did realise that ff_getIdByName was the wrong way to go because when I played with documet.write ff_getIdByName nothing came up....so I did document.write ff_getElementByName instead and that one did actualy bring it up.

However I cannot figure out a way to make it work with the date picker.

I've done the following:
{"ff_getElementByName('ff_mn_nnnnnnnnn')":"d-sl-m-sl-Y"},
and
{ff_getElementByName('ff_mn_nnnnnnnnn'):"d-sl-m-sl-Y"},
and
{return ff_getElementByName('ff_mn_nnnnnnnnn'):"d-sl-m-sl-Y"},
nothing!! :unsure:

I also tried to use a few other options but my javascript knowledge is limited, because I'm not a programer. I just learn as I go along :whistle:



RE:tdemnati
I spend days looking for a joomla calendar replacement, but I did not find any as good as this.

Anyway If i figure out a way to do this thing here, then we will just have to name the calendar field with the same name, or just clone the form and it will work straight away without fidling....
There must be a way!!!

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.099 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!