title: jquery checkbox selected and disabled does not allow to save form
body: <p>i am stuck at logical condition , i have a form in which when checkbox called all day event is clicked then two input text gets disabled called input start time and end time. remaining input text are needed to fill value.the issue is happening is when i click on checkbox all day event. and fill value in remaining three text fields and then i click on save button.then i get validation error messages at the bottom of disabled text fields.i.e <strong>when checkbox is checked and disabled fields are empty they prevent to save form and shows error messages at the bottom. this is the issue i am facing</strong> </p>
  
  <p><strong>when checkbox is checked and disabled field has some values in it then the saves properly</strong>   </p>
  
  <p>here is jsp</p>
  
  <pre><code>                                &lt;form action="" method=""&gt;
                                      &lt;div class="left-add"&gt;
                                          &lt;div class="fbox"&gt;
                                              &lt;input name="oldEventName" id="oldEventName" type="hidden" value="aaa"&gt;
                                              &lt;label for="eventName"&gt;&lt;span&gt;&lt;/span&gt;Event Name&lt;/label&gt;                                              
                                              &lt;input type="text" id="eventName" maxlength="40" value=""&gt;                                              
                                          &lt;/div&gt;
                                          &lt;br clear="all"&gt;
                                          &lt;h3 style="margin:30px 0;display:block;clear:both;"&gt;Event time&lt;/h3&gt;
                                          &lt;div class="fbox timepicker"&gt;
                                              &lt;label for="startDate"&gt;&lt;span&gt;&lt;/span&gt;Start Date&lt;/label&gt;
                                              &lt;input type="text" id="startDate" value="" class="hasDatepicker"&gt;
                                          &lt;/div&gt;
                                          &lt;div class="fbox timepicker"&gt;
                                              &lt;label for="startTime"&gt;&lt;span&gt;&lt;/span&gt;Start Time&lt;/label&gt;
                                              &lt;input type="text" id="startTime" value="" placeholder="Ex: 08:00" disabled=""&gt;
                                          &lt;/div&gt;
                                          &lt;div class="fbox timepicker" style="width:250px !important;"&gt;
                                              &lt;select name="startTime_ampm" id="startTime_ampm" class="select" style="margin-top: 41px;width:100px;" disabled=""&gt;
                                                  &lt;option value="AM"&gt;AM&lt;/option&gt;
                                                  &lt;option value="PM"&gt;PM&lt;/option&gt;
                                              &lt;/select&gt;
                                              &lt;input id="allDayEvent" name="allDayEvent" type="checkbox" value="true"&gt;
                                              &lt;label for="allDayEvent" style="float: right; margin: 35px 0 0 0;"&gt;&lt;span&gt;&lt;/span&gt;All Day Event&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;br clear="all"&gt;
                                          &lt;div class="fbox timepicker"&gt;
                                              &lt;label for="endDate"&gt;&lt;span&gt;&lt;/span&gt;End Date&lt;/label&gt;
                                              &lt;input type="text" id="endDate" value="" class="hasDatepicker"&gt;
                                          &lt;/div&gt;
                                          &lt;div class="fbox timepicker"&gt;
                                              &lt;label for="endTime"&gt;&lt;span&gt;&lt;/span&gt;End Time&lt;/label&gt;
                                              &lt;input type="text" id="endTime" value="" placeholder="Ex: 08:00" disabled=""&gt;
                                          &lt;/div&gt;
                                          &lt;div class="fbox timepicker" style="width:250px !important;"&gt;
                                              &lt;select name="endTime_ampm" id="endTime_ampm" class="select" style="margin-top: 41px;width:100px;" disabled=""&gt;
                                                  &lt;option value="AM"&gt;AM&lt;/option&gt;
                                                  &lt;option value="PM"&gt;PM&lt;/option&gt;
                                              &lt;/select&gt;
                                          &lt;/div&gt;
  
                      &lt;div class="bttns"&gt;
                          &lt;input type="button" id="bttn_save" class="bttn save" value="Save" onclick="saveEventForEditOrCreate()"&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;&lt;/div&gt;
  
              &lt;/div&gt;
  </code></pre>
  
  <p>and jquery function for this entire form as follows</p>
  
  <pre><code>function saveEventForEditOrCreate() {
  
          $('.custom_error_msg').remove();
          var eventName=$('#eventName').val().trim();
          if(eventNames.indexOf(eventName)&gt;-1){
              validationError("eventName", "This is an invalid event name.  Please update the name and try again.");
              return true;
          }
  
          var startDate = $('#startDate').val();
          var endDate = $('#endDate').val();
          var startTime=$('#startTime').val();
          var endTime=$('#endTime').val();
  
          // if allDayEvent is checked and all fields are empty
          if($( "#allDayEvent" ).is( ":checked" ) &amp;&amp; $('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp; isDate(endDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("endDate", "Make have end date");
              return true;
          }
          // if alldayevent is checked and event name start date is empty
          else if($( "#allDayEvent" ).is(':checked') &amp;&amp; $('#eventName').val()==="" &amp;&amp; isDate(startDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              return true;
          }
  
          // if alldayevent is checked and event name start date is empty
          else if($( "#allDayEvent" ).is(':checked') &amp;&amp; $('#eventName').val()==="" &amp;&amp; isDate(endDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("endDate", "Must have end date");
              return true;
          }
          // if alldayevent is checked and event name is empty 
          else if($( "#allDayEvent" ).is(':checked') &amp;&amp; $('#eventName').val()==="")
          {
              validationError("eventName", "Must have event name");
              return true;
          }
          // if alldayevent is checked and event name is present and start date is empty
          else if($( "#allDayEvent" ).is(':checked') &amp;&amp; isDate(startDate) === false)
          {
              validationError("startDate", "Must have end date");
              return true;
          }
          else if($( "#allDayEvent" ).is(':checked') &amp;&amp; $("#startTime").prop('disabled') &amp;&amp; $("#endTime").prop('disabled') &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; validateHHMM($("#endTime").val()) === false)
          { 
              $("#startTime").empty();
              $("#endTime").empty();  
              return false;
          }
          else
          {
              // if alldayevent is checked and event name is present and end date is empty
              if($( "#allDayEvent" ).is(':checked') &amp;&amp; isDate(endDate) === false )
          {
              validationError("endDate", "Must have end date");
              return true;
          }
  
          } //else ends
  
  
          // if event name and all felds are blank
           if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }   
          //if event name and  all are empty , only start date is filed 
          else if($('#eventName').val()===""  &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date" );
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // if event name and  all are empty , only start time is filed 
          else if($('#eventName').val()===""  &amp;&amp; isDate(startDate) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // if event name and  all are empty , only end date is filed 
          else if($('#eventName').val()===""  &amp;&amp; isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false  &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // if event name and  all are empty , only end time is filed 
          else if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              return true;
          }
          // // if event name , start date , start time are empty
          else if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // if event name , end date , end time are empty
          else if($('#eventName').val()==="" &amp;&amp; isDate(endDate) === false &amp;&amp; validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("endDate", "Must have start date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // if event name , start date , end date are empty 
          else if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp; isDate(endDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("endDate", "Make have end date");
              return true;
          }
          // if event name , start time , end time are empty 
          else if($('#eventName').val()==="" &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }   
  
          //  if event name , start date , end time are blank
           else if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // // if event name , start time , end date are blank
          if($('#eventName').val()==="" &amp;&amp;  validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              return true;
          }   
  
          // // // if event name is present and all fields are empty
          else if(isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }   
  
  
          // // // if event name , start date are present and all fields are blank
          else if(validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // //if event name and end date are present and all fields are blank
          else if(isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
  
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // // if event name , start time are present and all fields are blank
          else if(isDate(startDate) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
              validationError("startDate", "Must have start date");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // // if event name , end time are present and all fields are blank
          else if(isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false)
          {
              validationError("startDate", "Must have start date");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              return true;
          }
  
  
          // //  // if event name , start date  blank
           else if($('#eventName').val()==="" &amp;&amp; isDate(startDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startDate", "Must have start date");
              return true;
          }
  
          // // // if event name , start time are blank
          else if($('#eventName').val()==="" &amp;&amp;  validateHHMM($("#startTime").val()) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          // // // if event name , end date are blank
          else if($('#eventName').val()==="" &amp;&amp;  isDate(endDate) === false)
          {
              validationError("eventName", "Must have event name");
              validationError("endDate", "Make have end date");
              return true;
          }
  
          // if event name , end time are blank
          else if($('#eventName').val()==="" &amp;&amp; validateHHMM($("#endTime").val()) === false )
          {
              validationError("eventName", "Must have event name");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
  
          // // if event name is present and start date , end date are blank
          else if(isDate(startDate) === false &amp;&amp; isDate(endDate) === false )
          {
  
              validationError("startDate", "Must have start date");
              validationError("endDate", "Make have end date");
              return true;
          }
  
          // // if event name is present and start time , end time are blank
          else if( validateHHMM($("#startTime").val()) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
  
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
  
          //  event name is present and start date , end time are blank
          else if(isDate(startDate) === false &amp;&amp; validateHHMM($("#endTime").val()) === false )
          {
  
              validationError("startDate", "Must have start time");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
  
  
          //  event name is present and start time , end date are blank           
          else if(validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false )
          {
  
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              return true;
          }
  
  
          else  //event name is filled and all are empty
          {
              if(isDate(startDate) === false &amp;&amp; validateHHMM($("#startTime").val()) === false &amp;&amp; isDate(endDate) === false &amp;&amp;  validateHHMM($("#endTime").val()) === false )
          {
  
              validationError("startDate", "Must have start time");
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              validationError("endDate", "Make have end date");
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          } //else ends  
  
  
  
          //any single fields are empty   
          if(isDate(startDate) === false) {
              validationError("startDate", "Must have start date");
              return true;
          }
          if(isDate(endDate) === false)   {
              validationError("endDate", "Make have end date");
              return true;
          }
          if(validateHHMM($("#startTime").val()) === false )  {
              validationError("startTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
          if(validateHHMM($("#endTime").val()) === false )    {
              validationError("endTime", "Make sure time is in the HH:MM format.  Example: 08:00");
              return true;
          }
  
          if( $("#oldEventName").val() != "" ) {
              updateEvent();
          }
          else {
              createEvent();
          }           
      }
  </code></pre>