Form Help

TOPIC:

disable some days on calendar form 1 year 4 months ago #261988

  • Topic Author
  • Martinelli
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
Hy,

i've to disable some days from calendar (Sunday + holiday weeks 01-15 August) on this forom: www.farmaciapapagno.it/tampone-antigenic...d-19-farmacia-latina

i've tryed the solution you provided here: crosstec.org/en/blog/946-disable-certain...onsive-calendar.html

with no success :(

In the form i use the format date: %d-%m-%Y

can you help me to find a solution?
Thanks in advance,

Luca

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

Last edit: Post by Martinelli.

disable some days on calendar form 1 year 4 months ago #261989

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11806
  • Karma: 3
  • Thanks: 763
Hi,

This is for responsive calendar but you are using standard calendar.

This cane be done with some validation code

I will send you an example in a few min

Regards,
Tihana

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

disable some days on calendar form 1 year 4 months ago #261991

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11806
  • Karma: 3
  • Thanks: 763
Hi again,

For your element "Calendar" you can make a validation. For example, if the user selects a date, a message appears that the date has been filled.

Go to your form element Calendar->Validation->Custom->Create code framework and put:
function ff_nameofelement_validation(element, message)
{
    var my_date = new Date(element.value);
   if( my_date.getDate() == 17 && my_date.getMonth() == 5){
   ff_validationFocus(element.name);
   return 'Please choose a different day, we are full on 17.6';
   }
    return '';
} // ff_nameofelement_validation

Note: Please replace nameofelement with your name for calendar.
getDate() return the day of the month (1-31)
getMonth() return the month (0-11)

P.S: this is for 17.6, you can replace it with dates you want

If you want to use responsive calendar then format is like: dd-mm-yyyy
And this solution is for this calendar :
crosstec.org/en/blog/946-disable-certain...onsive-calendar.html

Let me know if this solution is right for you.

Regards,
Tihana

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

disable some days on calendar form 1 year 4 months ago #261997

  • Topic Author
  • Martinelli
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
forgive me, I didn't realize I didn't have the responsive calendar enabled.
I will try to change the calendar type and follow your directions....
Luca

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

disable some days on calendar form 1 year 4 months ago #261998

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 3262
  • Karma: 2
  • Thanks: 160
Hi,

you do not need to change the type of calendar, in the comment above is described how to do it with the type element 'Calendar' as you have.


regards,
Mirko

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

disable some days on calendar form 1 year 4 months ago #262000

  • Topic Author
  • Martinelli
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
ok :)!!!

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

Moderators: ForumSupport
Time to create page: 0.042 seconds

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

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!