Home › Forums › Quform WordPress › MinDate & MaxDate
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by Ally.
- AuthorPosts
- August 30, 2016 at 10:32 am #19776dinmixParticipant
I’m trying to set the Datepicker to only allow date selection 2 days from today and max days is one month from today. Is this possible? I add the following code in HTML field but the calendar completely disappear. Im noob so please help me. Thanks in advanced.
<script>
jQuery(document).ready(function ($) {
$('.iphorm_1_9')
.attr('placeholder', 'dd/mm/yyyy')
.datepicker({
dateFormat: 'dd/mm/yy' ,
minDate: '+2d' ,
maxDate: '+1m'
});var themeUrl = iphormL10n.plugin_url + '/js/jqueryui/themes/smoothness/jquery-ui-1.8.24.custom.css';
$('head').append('<link id="iphorm-jqueryui-theme" rel="stylesheet" href="' + themeUrl + '" type="text/css" />');
});
</script>
September 1, 2016 at 9:57 pm #19799AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 2, 2016 at 4:07 am #19802dinmixParticipantThanks Ally,
Yes I wanted a Single Line text datepicker field. Anyway, I just managed to get it to work by adding them in the following. I’m not sure if this is the correct way of doing things but it work for me.
.datepicker({ minDate: '+2D' , maxDate: '+1M', dateFormat: 'dd/mm/yy' });
September 2, 2016 at 9:20 pm #19818AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.