Support » Plugin: Easy Forms for Mailchimp » Disable Specific Dates / Days with datepicker field

  • Resolved strandcreative

    (@strandcreative)


    Hi,

    Is there an extension available or filters / hooks available for achieving the following?

    We need to disable certain days / dates in the datepicker. E.G. only allow Mondays.

    We can see in the source code this is echoed:

    
    jQuery.fn.datepicker.dates['en'] = {
    	months: ["January","February","March","April","May","June","July","August","September","October","November","December"],
    	monthsShort: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
    	days: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
    	daysShort: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
    	daysMin: ["S","M","T","W","T","F","S"],
    	dateFormat: "dd\/mm\/yyyy",
    	firstDay: "1",
    	format: "dd\/mm\/yyyy",
    	isRTL: 0,
    	showButtonPanel: true,
    	numberOfMonths: 1,
    	today: 'Today'
    };
    

    Thanks

    • This topic was modified 3 years, 8 months ago by strandcreative. Reason: change of title
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @strandcreative,

    Unfortunately with the current implementation of the datepicker it is not possible to restrict dates. The code you’re seeing there is strictly for the names – if we added filters and changed those to just Mondays the datepicker would still show all the dates. We would need to add a filter for the datepicker’s options because we currently do not have one. However, we’re planning on changing the datepicker functionality soon and when we do that we’ll be sure to add in filters etc. to control this.

    Sorry about that,
    Kevin.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @strandcreative,

    We’ve just updated the datepicker and with some custom code you can now restrict dates. Are you still looking for this feature?

    Let me know,
    Kevin.

    Unfortunately I’ve used another plugin but thank you for letting me know Kevin 🙂 I’m sure somebody else would appreciate this in the future 🙂

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable Specific Dates / Days with datepicker field’ is closed to new replies.