Date time picker using jquery and html
Hi guys I have a requirement to design the date time picker using jquery and html....Anyway I designed that one and what the problem here is I am unable to store the selected date in a variable ..Here is the code that I have written please help me to store the selected date in a variable ... <html> <head> <script> $('#startdate').datetimepicker({ format: "YYYY-MM-DD", minDate: moment().subtract(2, 'years'), maxDate: moment() }); $('#enddate').datetimepicker({ format: "YYYY-MM-DD", minDate: moment().add(1,'days') }); </script> </head> <body> <div class="container"> <h2>DatetimePicker Start & End Date </h2> <div class="form-horizontal"> <div class="row"> <div class="col-sm-8"> <div class="form-group"> <div class="col-sm-3 control-label"> <label for="startdate" class="control-label">StartDate</label> </div> <div class="col-sm-5"> <div class="input-group date" id="startdate"> <input type="text" class="form-control" id="startDateText" ng-model='ganesh'/> <span class="input-group-addon"> <span class="glyphicon-calendar glyphicon"></span> </span> </div> </div> </div> </div> </div> <div class="row"> <div class="col-sm-8"> <div class="form-group"> <div class="col-sm-3 control-label"> <label for="enddate">EndDate</label> </div>