Hot to get incomplete datetime-local input values
I have the following form on my page: <input id='startDate' type='datetime-local' step=1 name='startDate'> I use this code to get the value of the field: var start = $('#startDate').val(); My problem is that the value of the input field remains undefined until every part of it has been filled out, including hours, minutes, seconds, and AM/PM. I would like to be able to get a value from the form with as little as just the year selected. How can I go about doing this? I'm happy to zero out the values not filled out, but I can't figure out how to get the part of the datetime-local that the user