JavaScript bootstrap-datetimepicker: layout issues with input textbox and icon bootstrap datetimepicker layout,bootstrap datepicker layout

I'm using the bootstrap-datetimepicker in a form with a radio button, and I'm having a lot of issues with it. The first problem is that only the old version of it is working for me, not the current one, but that's okay (though I'd like to know why). The bigger problem is that the layout is messed up: the little square with the calendar icon is bigger that the input textbox, like this: screenshot

I have several forms like this, and in some of them, the layout recovers when I replace the "name" attribute of the textbox with "id." That doesn't work for all forms though, and if I understand it correctly, I shouldn't use "id" with forms anyway. Taking it out completely also helps sometimes, but I need it to get the input for my form. I created a JSFiddle with my code, but it doesn't seem to work properly. Eonasdan's sample JSFiddle is slightly different from mine.

Here's my HTML code:

<div class="col-sm-5 col-sm-offset-1">
<div class="form-group">
    <div class="radio">
        <div class="textlikelabel">Question? *</div>
            <label><input value="answer1" type="radio" name="answers" required="required">Answer 1</label>
        </div>
       <div class="radio">
           <label><input value="answer2" type="radio" name="answers" required="required">Answer 2</label>
       </div>
       <div class="radio">
            <label><input value="answer3" type="radio" name="answers" required="required"/>Specific date:
            <div class="input-group date" id="datetimepicker2">                                                                    <input type='text' class="form-control" name="answer3text"/>
               <span class="input-group-addon">
                   <span class="fa fa-calendar"></span>
               </span>
            </div>
            </label>
        </div>                                        
</div> 
</div>

And here's the JavaScript:

$('#datetimepicker2').datetimepicker({                              
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-arrow-up",
down: "fa fa-arrow-down"
} });     

Any idea what I'm doing wrong?? I'd appreciate your help!

Answer:1

How is it possible to implement, using CSS only (the worst of cases using some JS) to do the following global.css (readonly) .red { color: red; /*tens of lines of additionnal css*/ } ...

How is it possible to implement, using CSS only (the worst of cases using some JS) to do the following global.css (readonly) .red { color: red; /*tens of lines of additionnal css*/ } ...

  1. conditionally apply class angular
  2. conditionally apply class react
  3. conditionally apply class vue
  4. conditionally apply class angular 4
  5. conditionally apply class angularjs
  6. conditionally apply class
  7. conditionally apply class in angular2
  8. conditionally add class react
  9. conditionally add class angular
  10. conditionally add classname react
  11. conditionally add class vue
  12. conditionally add class angular 6
  13. conditionally add class angular 2
  14. conditionally add class angular 4
  15. css conditionally apply class
  16. react conditionally apply classname
  17. vuejs conditionally apply class
  18. conditionally apply css class angular
  19. razor conditionally apply class
  20. add conditionally class

I have a form that is used to update a record, at the bottom I have a submit button. I want it to display a messaging saying "Update Record:" and a Yes and No box. Every way I've found is just for ...

I have a form that is used to update a record, at the bottom I have a submit button. I want it to display a messaging saying "Update Record:" and a Yes and No box. Every way I've found is just for ...

  1. submit button display text
  2. submit button display none
  3. submit button display block
  4. submit button display as link

In the angular tutorial there is this example: <h3> <a [title]="product.name + ' details'"> {{ product.name }} </a> </h3> it works great if I am writing it ...

In the angular tutorial there is this example: <h3> <a [title]="product.name + ' details'"> {{ product.name }} </a> </h3> it works great if I am writing it ...

  1. what difference between bourbon and whiskey
  2. what difference between vegan and vegetarian
  3. what difference between psoriasis and eczema
  4. what difference between flu a and b
  5. what difference between ipad and ipad air
  6. what difference between republic and democracy
  7. what difference between inc and llc
  8. what difference between chromebook and laptop
  9. what difference between md and do
  10. what difference between virus and bacteria
  11. what difference between w2 and w4
  12. what difference between perfume and eau de toilette
  13. what difference between cold and flu
  14. what difference between catholic and christian
  15. what difference between diabetes 1 and 2
  16. what difference between california king and king
  17. what difference between macbook air and pro
  18. what difference between airpod 1 and 2
  19. what difference between medicare and medicaid
  20. what difference between bipolar 1 and 2

I'm setting a value on $scope in an Ajax response function. $http.post('/aUrl', someData) .then(function(response) { $scope.value = response.data; }); This means it is undefined ...

I'm setting a value on $scope in an Ajax response function. $http.post('/aUrl', someData) .then(function(response) { $scope.value = response.data; }); This means it is undefined ...