0

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>

9th Jan 2019, 10:49 AM
Kiran Kumar
Kiran Kumar - avatar
3 odpowiedzi
+ 10
Hi, please post a code. Your chances for the answers will grow.
9th Jan 2019, 11:26 AM
r8w9
r8w9 - avatar
+ 6
Post it as code, not post a code into a question.
9th Jan 2019, 11:36 AM
r8w9
r8w9 - avatar
- 3
I have already posted that one...go through that broo...
9th Jan 2019, 11:32 AM
Kiran Kumar
Kiran Kumar - avatar