TOPIC:

Re: Calendar Button 11 years 8 months ago #33237

  • Lexica
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Breezing form 1.7.3 - Classic mode
Create a Static text/HTML
Then in the Text/HTML field drop this code:

<td width="87">Arrival date</td>
<br>
<td colspan="4" nowrap="nowrap">
<?php JHTML::_('behavior.calendar'); ?>
<input class="inputbox" name="arrivalDate" type="text" id="arrivalDate" size="18" maxlength="20" value="" />
<img class="calendar" src="templates/system/images/calendar.png" alt="calendar" id="showArrivalCalendar" />
<script type="text/javascript">
var startDate = new Date(2008, 8, 7);
Calendar.setup({
inputField : "arrivalDate",
ifFormat : "%m/%d/%Y",
button : "showArrivalCalendar",
range : [2011,2100],
date : startDate
});
</script>
</td>


Brings out the default jscalendar.

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

Last edit: Post by Lexica.

Re: Calendar Button 11 years 8 months ago #33268

  • rrmdp
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 5
  • Thanks: 0
I have other solution thanks to David from nosolocodigo.com

1- copy this code into the head tag in your template index.php

<?php JHTML::_('behavior.calendar'); ?>
<script src="includes/js/joomla.javascript.js" type="text/javascript"></script>

2- Create an input text box and save. Look at this elemt "Script ID", lets say NN

3- Create a new fiel Static Text/HTML with this value:

<a onclick="return showCalendar('ff_elemNN', '%Y-%m-%d');" > <img class="calendar" src="templates/system/images/calendar.png" /> </a>

Thats all.

Note: you can also copy the code of step 1 into : Edit Form -> Scripts -> Initialization Script > Custom instead into index.php

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

Re: Calendar Button 11 years 8 months ago #33288

  • lrawling
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 72
  • Karma: 1
  • Thanks: 2
Thanks rrmdp. This certainly seems like an easy solution. Unfortunately it throws a javascript error when I click the calendar icon - Line: 409 Object required??? I also tried adding the script in the Initialisation Script but that displayed a whole heap of jargon down the page.

Any clues?

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

Re: Calendar Button 11 years 8 months ago #33290

  • lrawling
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 72
  • Karma: 1
  • Thanks: 2
Hi Lexica,

Thank you for your prompt reply. I was able to successfully implement your method but the elements and corresponding values are not being parsed when the form is submitted. Do they with yours? Am I missing something?

Thanks,

Liz

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

Re: Calendar Button 11 years 8 months ago #33311

  • rrmdp
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 5
  • Thanks: 0
On my site works as a charm. If you want, post yous url and i will have a look.

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

Re: Calendar Button 11 years 8 months ago #33476

  • Lexica
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
I am trying to figure it out but no luck atm...

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

Moderators: ForumSupport
Time to create page: 0.043 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!