SHARE
TWEET

Untitled

a guest Jun 25th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {  
  2.             $(".monthPicker").datepicker({
  3.                 dateFormat: 'MM/yy',
  4.                 changeMonth: true,
  5.                 changeYear: true,
  6.                 showButtonPanel: false,
  7.                 monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
  8.                // monthNames: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  9.  
  10.                 onClose: function(dateText, inst) {
  11.                     var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
  12.                     var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
  13.                     $(this).val($.datepicker.formatDate('mm/yy', new Date(year, month, 1)));
  14.                 }
  15.             });
  16.  
  17.             $(".monthPicker").focus(function () {
  18.                 $(".ui-datepicker-calendar").hide();
  19.                 $("#ui-datepicker-div").position({
  20.                     my: "center top",
  21.                     at: "center bottom",
  22.                     of: $(this)
  23.                 });
  24.             });
  25.         });
  26.      
  27. <div class="form-group">
  28.               <label for="inputEmail3" class="col-sm-2 control-label">Período:</label>
  29.               <div class="row">
  30.                   <div class="col-sm-2">
  31.                    <input autocomplete="off" id="idPeriodoInicio" class="form-control monthPicker listar_uj" name="periodoInicio" id="periodoInicio"  placeholder="Período Inicial">
  32.                   </div>
  33.                    <div class="col-sm-2">
  34.                     <input autocomplete="off"  id="idPeriodoFim" class="form-control monthPicker listar_uj" name="periodoFim" id="periodoFim" placeholder="Período Final">
  35.                   </div>
  36.               </div>
  37.             </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top