You are viewing limited content. For full access, please sign in.

Question

Question

Using Alternate Calendar

asked on June 11, 2015 Show version history

I'm attempting to use the following MultiDatesPicker jQuery calendar and when I try to apply it to a "Single Line" field, the field will change behavior to act as a standard "Date" field, using the same Forms-style drop-down and also with the "calendar" icon next to the input box.  I'm assuming this is because Forms also uses the "datepicker" module (which is also a requirement of the above-linked plugin.)

$(document).ready(function () {
    $.getScript('/Forms/js/jquery-ui.multidatespicker.js', function() {
      $('#q31 input').multiDatesPicker();
    });
});

 

Is there something I need to do to override the standard datepicker module? Any help appreciated.

 

Edit:

It looks like when I apply the above, the "hasDatePicker" class is added to the Field, even though this is a Single Line field. I'm sure this is causing most/some of the issue

<input id="Field31" class="singleline cf-medium user-success hasDatepicker" type="text" vo="e" list="datalist31" maxlength="4000" name="Field31" min="1900-01-01" max="2200-12-31">

 

0 0

Answer

SELECTED ANSWER
replied on June 11, 2015 Show version history

I managed to figure this out by removing any "hasDatepicker" class from the document.

$('.hasDatepicker').removeClass('hasDatepicker');

I assume this means that I won't be able to have a standard Forms Date field on this form, but that's okay.

$(document).ready(function () {
   $.getScript('/Forms/js/jquery-ui.multidatespicker.js', function() {
      $('#q31 input').multiDatesPicker();
      $('.hasDatepicker').removeClass('hasDatepicker');
   });
});

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.