Вопрос

I actually already have an answer for this, but am posting here in case anyone else has the same problem

Using the SheepIt jQuery plug-in, I cannot inject data into input fields of type date, such as:

<input type='date' name='birthday' />
Это было полезно?

Решение

  1. Make sure you are formatting the date as YYYY-MM-DD. Formatting days or months without leading zeros will cause an error, as will using any other delimiter other than -.

  2. Change your SheepIt plugin file. Line 1073 needs to include type == 'date' in the conditional check, like so:

    // hidden, text, password
    if (type == 'text' || type == 'hidden' || type == 'password' || type == 'date') {
        field.attr('value', value);
        return true;
    }
    
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top