How to add bootstrap calendar to #gvnix finder?

99 Views Asked by At

How to add bootstrap calendar to gvnix finder? I'm researching the tags generated by gvnix and found in this tag: jquery/form/create.tagx this code

    <!-- DISID: added Bootstrap classes -->
<script type="text/javascript">
  jQuery(document).ready(function() {
      /* span12 */
      jQuery(".control-label").addClass("col-xs-5 col-sm-4 col-md-3 col-lg-3");
      jQuery(".controls").addClass("col-xs-7 col-sm-8 col-md-9 col-lg-9");
      jQuery(".box").addClass("col-xs-7 col-sm-8 col-md-9 col-lg-9");/* no exists .controls */
      jQuery(".controls.datetime").removeClass("col-xs-7 col-sm-8 col-md-9 col-lg-9").addClass("col-xs-7 col-xs-offset2 col-sm-5 col-sm-offset3 col-md-4 col-md-offset5 col-lg-3 col-lg-offset6");
  });
  </script>

I tried including that in my finder.jspx but the calendar doesn't show any hint? you can check this url of the petclinic online demo, it doesn't show calendar: http://petclinic-gvnix.rhcloud.com/visits?find=ByVisitDateBetween&form&page=1&size=10

Thank you Gvnix team for make this addon. I'm really impressed with all the things we can do.

1

There are 1 best solutions below

0
On

There is a problem on tags/jquery/from/fields/datetime.tagx. To solve it, modify this file lines:

    <c:when test="${disableFormBinding}">
      <input id="_${sec_field}_id" name="${sec_field}" cssClass="datepicker form-control input-sm"

like this:

    <c:when test="${disableFormBinding}">
      <input id="_${sec_field}_id" name="${sec_field}" class="datepicker form-control input-sm"

Good luck!