0

I decided to change dashboard selected period rage datetime. I chose bootstrap-datetimepicker.

$(function () {              
                $("#datetime_input").datetimepicker({
                    locale: 'ru'
                });
                $("#datetime_output").datetimepicker({
                    locale: 'ru'
                });
   });
<div class="row">
        <span>C</span>
        <div class='col-xs-3'>
            <div class="form-group">
                <div class='input-group date' id='datetime_input'>
                    <input id="INPUT_DATETIME" type='text' class="form-control" value="${INPUT_DATETIME}"/>
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
        </div>

        <span>По</span>
        <div class='col-sm-3'>
            <div class="form-group">
                <div class='input-group date' id='datetime_output'>
                    <input id="OUTPUT_DATETIME" type='text' class="form-control" value="${OUTPUT_DATETIME}"/>
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
        </div>
</div>

How resize field input datetime in bootstrap-datetimepicker? enter image description here For example how reduce field input datetime?

enter image description here

How to eliminate the resulting difference?

p.s. I found some question

BUT proposed solution not work for my case.

2
  • please fix errors in your snippet... Commented Sep 12, 2016 at 12:45
  • fixed, absent </div> Commented Sep 12, 2016 at 12:49

1 Answer 1

0

Your question is not clear. May be you want to implement date range picker in your dashboard with bootstrap datetime picker.So, if it is like that then the below link is useful to you.

Link : http://www.daterangepicker.com/

Use the below code :

 <div class="row">
    <span>C</span>
    <div class='col-xs-3'>
        <div class="form-group">
            <div class='input-group date' id='datetime_input'>
                <input id="INPUT_DATETIME" type='text' class="form-control"  value="${INPUT_DATETIME}"/>
                <span id="input_pick" class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
        </div>
    </div>

    <span>По</span>
    <div class='col-sm-3'>
        <div class="form-group">
            <div class='input-group date' id='datetime_output'>
                <input id="OUTPUT_DATETIME" type='text' class="form-control" value="${OUTPUT_DATETIME}"/>
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
        </div>
     </div>
  </div>

Add CSS code :

 #INPUT_DATETIME{
   width : 177px;
 }
 #input_pick{
  width: 37px; 
  height: 34px;
  float: left;
 }
Sign up to request clarification or add additional context in comments.

10 Comments

For example how reduce field input datetime?
reduce means in which context?
I add jpg: the distance from the last digit to the icons I want to reduce.
Ok, so if your design is not responsive then give fix width to input datetime element and span that is used to pick date give it to float : left
Please specify your answer
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.