如何提供Bootstrap Datepicker淡化效果?

时间:2016-07-26 21:05:21

标签: jquery bootstrap-datepicker bootstrap-datetimepicker

我在Symfony应用程序中使用Bootstrap Datepicker。我想在打开和关闭Datepicker时获得fadeIn和fadeOut效果。由于图书馆没有任何文件可以解决这个问题,我有什么方法可以自己调整一下吗?

以下是初始化Datepicker的twig文件:

{% block body %}
<div class="container-fluid">
    <div class="row">
        <div class="carousel" id="myCarousel" data-ride="carousel">
                <ol class="carousel-indicators">
                <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                <li data-target="#myCarousel" data-slide-to="1"></li>
                <li data-target="#myCarousel" data-slide-to="2"></li>
            </ol>

            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img src="{{ asset('../../../../../images/image-1.jpg') }}">
                </div>

                <div class="item">
                    <img src="{{ asset('../../../../../images/image-2.jpg') }}">
                </div>

                <div class="item">
                    <img src="{{ asset('../../../../../images/image-3.jpg') }}">
                </div>
            </div>

           <div class="form-contents">
               <div class="row">
                   {{ form_start(form, {'attr': {'autcomplete':'off'}}) }}
                   {{ form_errors(form) }}

                   <div class="form-group col-xs-6">
                       {{ form_label(form.Place, 'Where') }}
                   </div>

                   <div class="form-group col-xs-6">

                       {{ form_label(form.Date, 'When') }}
                       {{ form_errors(form.Date) }}
                       {{ form_widget(form.Date, {'attr': {'class':'form-control','autcomplete':'off', 'placeholder':'Pick a day',
                                                    'data-provide':'datepicker', 'readonly':'', 'data-date-today-highlight':false,
                                                    'data-date-format':'dd/mm/yyyy', 'data-date-autoclose': true
                                                   }
                       })}}

                   </div>
               </div>

               <div class="row">
                   <div class="col-xs-12">
                       {{ form_row(form.save, {'attr': {'class':'btn btn-lg'}}) }}
                   </div>

                   {{ form_end(form) }}
               </div>
           </div>
           {{ parent() }}
       </div>
    </div>
</div>
{% endblock %}

1 个答案:

答案 0 :(得分:0)

http://codepen.io/anon/pen/grKwLz

我编辑了bootstrap-datepicker.js的源代码。看看第479-486行。

变化:

case class AggSchema(edge: Edge, count: Long)

df.toDF("edge", "count").as[AggSchema]