Is it possible to find out if input type = datetime-local is halfway full? For example, if only a date or time is populated?
<input type="datetime-local" class="form-control input-lg" id="dueDate" ng-model="jobDueDate" min="{{currentMin | date:'yyyy-MM-ddTHH:mm'}}" placeholder="Due Date" >
The value of the element element of the input tag is empty, regardless of whether it is empty or half full.
var valuedate = document.getElementById('dueDate'); console.log(valuedate.value());
Date.parse returns NaN for both cases as well. Is there a possible solution? I use jQuery and AngularJS if they can help. Feel free to send cleaner solutions using other input types (no extra libraries). The goal is for the user to fill in both fields.
EDIT: the field can be empty or completely filled. I need to know if it is half full so I can request the user or calculate the required date.
source share