Responsive Calendar shows up near the end of the form

  • martenj52
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0

martenj52 created the topic: Responsive Calendar shows up near the end of the form

Hello,

I have a form, about 1500px long (uses autoheight iframe) and Responsive Calendar is used in two different fields, one near the beginning and the other near the end.
The problem is that when it shows up, it always appears near the end of the form page, and not near its relevant field.
Is there a workaround this?

Also, I used the validation script I found in the Documentation, for validating the 2nd calendar field so that the date selected is not in the past. It works ok, but the format must be MM-DD-YYYY. I need DD-MM-YYYY, is that possible?
#239404
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 3124
  • Karma: 104
  • Thank you received: 409

mihaela replied the topic: Responsive Calendar shows up near the end of the form

Hello,

I am not sure why you are facing this issues.

Would it be an option for you to use the regular Calendar element instead of the Responsive Calendar?

As for the validation, you can provide me the code that you are using which works for MM-DD-YYYY date format validation and I can adjust it to work for DD-MM-YYYY.

Regards,

Mihaela
#239408
  • martenj52
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0

martenj52 replied the topic: Responsive Calendar shows up near the end of the form

It's the code I found here in the Documentation of the site,
function ff_currentdate_validation(element, message)
{
     if(element.value.split("-").length != 3){return message == '' ? element.name+" faild in my test.n" : message}
 
     var vDate = new Date(Number( element.value.split("-")[2]),Number(element.value.split("-")[0]-1),Number(element.value.split("-")[1]),0,0,0).getTime();
 
 
     var today = new Date();
 
     today.setHours(0);
     today.setMinutes(0);
     today.setSeconds(0);
     today.setMilliseconds(0);
     today = today.getTime();
 
     if(vDate < today)
     {
          if (message=='') message = element.name+" faild in my test.n";
          return message;
     }
     return '';
}

(In the first line, the "currentdate" is that calendar element's name in our form)

I tried the option of the normal calendar, but then the validation didn't work at all, for all elements in the form. So I switched back to the responsive calendar.

I include a screenshot, in 100% size, of the front end rendering, to see the problem. User has to scroll down the page, at the end of the form, to see the responsive calendar:
#239431
Attachments:
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 3124
  • Karma: 104
  • Thank you received: 409

mihaela replied the topic: Responsive Calendar shows up near the end of the form

Hello,

Please try to use this script to validate a
function ff_currentdate_validation(element, message)
{
     if(element.value.split("-").length != 3){return message == '' ? element.name+" faild in my test.n" : message}
    
     var vDate = new Date(Number( element.value.split("-")[2]),Number(element.value.split("-")[1]-1),Number(element.value.split("-")[0]),0,0,0).getTime();
 
     var today = new Date();
 
     today.setHours(0);
     today.setMinutes(0);
     today.setSeconds(0);
     today.setMilliseconds(0);
     today = today.getTime();
 
     if(vDate < today)
     {
          if (message=='') message = element.name+" faild in my test.n";
          return message;
     }
     return '';
}

That is strange behavior that the calendar appears on the bottom of the form.

Let's see whether this script will work as you wanted and we can move on then.

Regards,

Mihaela
#239486
The following user(s) said Thank You: martenj52
  • martenj52
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0

martenj52 replied the topic: Responsive Calendar shows up near the end of the form

The validation script works just fine, thanks a lot.

I tried some other themes, but I get the same issue with the responsive calendar. I don't know if it has to do with setting a form height in px (Form Settings: Height, just above the Autoheight option, which is also turned on) - it may be irrelevant, just a thought.

Will continue on this next.
#239503
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 3124
  • Karma: 104
  • Thank you received: 409

mihaela replied the topic: Responsive Calendar shows up near the end of the form

Hello again,

Can you please try to preview your form in the backend of your site to see whether the calendar will be properly aligned.

Let me know the result.

Regards,

Mihaela
#239531
Moderators: ForumSupporttomeperica
Time to create page: 0.046 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription 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 for just 49! (Summer Sale)

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the 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