Forums Forums Search & Filter Pro Upgrade the datepicker

Viewing 3 posts - 1 through 3 (of 3 total)
  • Trevor
    #129673

    These options you should be able to add yourself using a javascript on the page. You would need to google for the solution, if the scripts shown on their own pages do not work.

    Anonymous
    #129694

    For “Restrict the range”, I found, I share for the community.

    $.datepicker.setDefaults({
    	minDate: 0,
    	maxDate: "+10D",
    });

    By cons, for “Select the date range”, I have to raise the event “.on(“change”)”.
    But, although I point the event on the corresponding input, nothing does. Do you have any ideas?

    var $from = $('.sf_date_field li:first-child .sf-datepicker'),
    	$to = $('.sf_date_field li:nth-child(2) .sf-datepicker');
    
    $from.datepicker().on("change", function() {
    	alert('Change');
    });
    Trevor
    #129789

    The datepicker is a bit weird and on change does not always get detected. I would Google for a way to detect the change for the datepicker, the answer will probably be on StackExchange.

Viewing 3 posts - 1 through 3 (of 3 total)