I am trying to validate that the time in my "if" statement. This is a javascript file. It's not able to add a new to-do.
validateFields() {
var self = this;
var good = true;
if(self.$el.find('.todo-name-input').val().trim().length<=0)
{
good = false;
}
if (self.$el.find(State.getState().sectionID ==0))
{
time = self.$el.find('.edit-todo[data-id=]' + State.getState().openSectionId + ('.todo-time-input').val().trim()
}
//var time = self.$el.find('.todo-time-input').val().trim();
if(time.length<=0) {
good = false;
}
Aucun commentaire:
Enregistrer un commentaire