datepicker

This commit is contained in:
Aung Myo
2017-06-13 12:27:45 +06:30
parent 4f7fda6902
commit b513aa22ab
10 changed files with 36 additions and 5 deletions

View File

@@ -92,7 +92,8 @@
</div>
<div class="form-group">
<%= f.input :date_of_birth,:class=>"form-control date_of_birth"%>
<label>Date Of Birth</label>
<%= f.text_field :date_of_birth,:class=>"form-control datepicker"%>
</div>
<div class="form-group">
@@ -119,6 +120,15 @@
<script type="text/javascript">
$(function() {
$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
});
$('.datepicker').attr('ReadOnly','true');
$('.datepicker').css('cursor','pointer');
});
$(document).on('click',".checkbox_check",function(){
if(this.checked){

View File

@@ -92,7 +92,8 @@
</div>
<div class="form-group">
<%= f.input :date_of_birth,:class=>"form-control date_of_birth"%>
<label>Date Of Birth</label>
<%= f.text_field :date_of_birth,:class=>"form-control datepicker"%>
</div>
<div class="form-group">
@@ -117,6 +118,14 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.js"></script>
<script type="text/javascript">
$(function() {
$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
});
$('.datepicker').attr('ReadOnly','true');
$('.datepicker').css('cursor','pointer');
});
$(document).on('click',".checkbox_check",function(){
if(this.checked){