Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Time Validation is not working properly.

$
0
0

Time validation is not working properly

                                         

But When i entered 9:59 AM PickUp Time and Drop Time 11:15AM then its not validating properly. As i validate drop time should be greater, But i already select greater time 11:15AM 

$(function () {  
                $('#pickTime').datetimepicker({
ignoreReadonly: true,
                    format: 'LT'
                });
            });

   $(function () {
                $('#drpTime').datetimepicker({
                ignoreReadonly: true,
                    format: 'LT'
                });
            }); 

 if(pickTime>=drpTime && CheckPickUp=="Yes" && CheckDropUp=="Yes" &&  drpTime!="" && varPickDate >= varDrpDate)
            {
              isValid = false;
              $('#drpTime').after('<div class="error">Drop time should be greater than pickup time</div>');
            }

HTML:-

<div class="row">
                                                <div class="col-md-12">
                                                    <div class="col-md-4">
                                                        <div class="form-group">
                                                            <label for="traveller-name"><b>
Time  <span class="ast">
*</span></b></label>
                                                        </div>
                                                    </div>
                                                        <div class="col-md-4" id="divpickTime">
                                                             <div class="form-group">
                                                          <input type="text" id="pickTime" readonly="readonly"  class="form-control"/>                                                        
                                                                
                                                    </div>
                                                            </div>
                                                    <div class="col-md-4" id="divdrpTime">
                                                            <input type="text" id="drpTime" readonly="readonly"  class="form-control input-small"/>
                                                          
                                                                
                                                    </div>
                                                </div>
                                            </div>


Shiv Sharma


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>