javascript - Date is filtered during Edit -


i using bootstrap date picker , disable previous days during create. while editing saved date, if saved date less today's date, date not displayed in text field. want show saved date , want restrict date picker.

here how displayed when date higher today's date

enter image description here

enter image description here

here rails view

<div class='input-group' id='datetimepicker1'>     <%= text_field_tag :effective_date, datetime.parse(@master_price.effective_date.to_s).strftime("%d-%m-%y"), class:'form-control readonly',                             placeholder:'in date',:autocomplete => :off,:required => true, :readonly => true%>     <span class="input-group-addon">       <span class="fa fa-calendar"></span>     </span> </div> 

here js function

$(function () {    $('#datetimepicker1').datetimepicker({format: 'dd-mm-yyyy', ignorereadonly: true, showclose: true, mindate: new date().sethours(0,0,0,0)});    $("#datetimepicker1").on("dp.change", function (e) {     }); }); 

i want same results in images when saved date less today's date. thanks.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -