• Resolved james215

    (@james215)


    Hello,

    Does anyone know of a CSS or HTML code that will allow me to block-out certain dates when is comes to the date form field.

    What I am trying to do is not allow a person to pick a date on the form for an appointment that is not 2 days out from the date they filled out my form.

    For example is a visitor fills out my form on March 3rd then I want the calendar to not allow them to choose March 4th or 5th as a appointment request date, but to force them to pick March 6th or later.

    I would like to be able to do this as my typical response to the submission could take 24-48 hours for a reply.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    This will take some custom code to accomplish. https://developer.ninjaforms.com/codex/datepicker/

    Thread Starter james215

    (@james215)

    I apologize, but I marked this as resolved a little over a month ago, but I am revisiting this again. I just need to which code to use from the sample code. Please see below. I know I will need to modify the code, but I am not sure what to modify to.

    dateObject.pikaday._o.i18n = {
    previousMonth : ‘Month Before’,
    nextMonth : ‘Month After’,
    months : [‘Jan’,’Feb’,’Mar’,’Apr’,’May’,’Jun’,’Jul’,’Aug’,’Sep’,’Oct’,’Nov’,’Dec’],
    weekdays : [‘Sunday’,’Monday’,’Tuesday’,’Wednesday’,’Thursday’,’Friday’,’Saturday’],
    weekdaysShort : [‘Sun’,’Mon’,’Tue’,’Wed’,’Thu’,’Fri’,’Sat’]
    };

    or

    ateObject.pikaday._o.disableDayFn = function( date ) {
    var disabledDays = [“2017-04-28”, “2017-04-29”, “2017-04-30”];

    if ( _.indexOf( disabledDays, moment( date ).format( “YYYY-MM-DD” ) ) !== -1 ) {
    return true;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Date Drop-Down Field’ is closed to new replies.