Take the 2-minute tour ×

I'm working on this input right now using bootstrap 3.0 and bootstrap-datepicker from eternicode.

The problem is that I'm having by default the input to be disabled, because I do not want the user to be modifying the date by his hand.

I'm assigning an input addon with a glyphicon of a calendar to show the datepicker. The problem though is that whenever I select a date, the input doesn't receive the date. I've been going through the docs and there's a way to do it, but it is with Bootstrap 2.3.2 only.

Here is my code, does anybody know how can I transfer the selected date from the datepicker into my disabled input?

Help will be much appreciated!


<div class="form-group">
     <label class="control-label" for="fechaTandas">Fecha</label>
      <div class="input-group">
     <span class="input-group-addon date" id="trigger-datepicker"><span class="glyphicon glyphicon-calendar"></span></span>
   <input type="text" class="form-control" name="fechaTandas" disabled="disabled" id="fechaTandas" placeholder="seleccione una fecha">


//JS to trigger the datepicker
     format: "yyyy/mm/dd",
    language: "es"    

This is the link to eternicodes datepicker plugin:


share|improve this question

1 Answer 1

up vote 0 down vote accepted

I think you need to handle the DatePicker's change event..

    .on("changeDate", function(e){



Demo: http://bootply.com/88516

share|improve this answer
Thank you very much! It worked as intended. I have no idea why the language doesn't change to spanish since the client for this is a spanish speaking company, but I'll have to see that later. –  hsoto Oct 18 '13 at 13:46

Your Answer


