The title says it all and I can't figure it out. I also can't seem to find a solution searching for it here.
The datepicker won't close after a selected date is chosen and it also lets you choose old past dates.
What is the issue here?
The title says it all and I can't figure it out. I also can't seem to find a solution searching for it here.
The datepicker won't close after a selected date is chosen and it also lets you choose old past dates.
What is the issue here?
The default datepicker doesn't have a range limit. You would have to add some script to your theme files to prevent past dates.. you would add this to the header.php file of your theme or wherever your theme provider suggest you put custom scripts.
<script type="text/javascript">
jQuery(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
jQuery('#<%= txtDate.ClientID %>').datepicker({
minDate: new Date(currentYear, currentMonth, currentDate)
});
});
</script>
http://codeasp.net/blogs/raghav_khunger/microsoft-net/1084/jquery-datepicker-disable-past-dates
As far as the not closing issue.. hard to say. Can you post a URL to your form so we can take a look?
Hello,
I've seen a few people here needing a datepicker with a limited date range, myself included. So I've written a self contained plugin that adds an additional Advanced field that can have a restricted start date, end date, or date range. It has customisable validation messages and works just like a normal Gravity Forms field.
It's free and hopefully people will find it useful - feedback is always appreciated.
You can get it here: http://www.smartredfox.com/2013/05/gravity-forms-limited-date-field/
Thanks,
James
Are you going to be able to get that on the WordPress Extend Plugins as most people feel comfortable getting things from there. And that's great that you've developed it. I hope it helps lots of people.
That's the plan... I just have to remember how to use SubVersion again and then I'll add it in.
Once I've added it I'll post a link here if that's ok?
Thanks,
James