Calendar is not storing the recorded date.

  • Posts: 1437
  • Karma: 48
  • Thank you received: 188

mihaela replied the topic: Calendar is not storing the recorded date.

Hello again,

I see now how you want this to work.

To achieve what you want do as follows.
Go to form's Advanced properties > Form pieces and in Before Form section set Type to Custom. In the code area below put the following code:
echo '<script type="text/javascript">
                                        
    JQuery(document).ready(function () {
                             
        JQuery("#ff_elem26793_calendarButton").pickadate({
			format: "yyyy-mm-dd", 
                        selectMonths: true,
                        selectYears: true,
                        min: true,
                        editable: true,
                        firstDay: 1,
			onSet: function() {JQuery("#ff_elem26793").val(this.get("value"));
ff_getElementByName("cal2").value = ff_getElementByName("cal").value; }
		});
        });
</script>';
NOTE: In the code above replace ff_elem26793 with the ID of first calendar element for "check in". Also, replace ff_elem26793_calendarButton with the ID of it's button.
Furthermore, replace cal2 with the Name of 2nd calendar field and cal with the Name of first calendar field from which value should be copied.

That should do the trick.
Also, I've added functionality that users aren't able to select date in the past (since this is "check in" date).
If you want to remove that functionality, just remove this line from the script above:
min: true,

Don't forget to remove the previous Initialization script.

Let me know whether this works as you wanted.

Regards,

Mihaela
#232248
Moderators: ForumSupporttomeperica
Time to create page: 0.054 seconds

New Support System

Dear Customers,

Users with active subscription have support priority which will be dona via ServiceDesk (My Account > Raise a ticket).
FREE Support topics will be answered when AND if there is time.

You can check support guidelines here : here

Regards,
Crosstec Team

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here