Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
Las manipulaciones de jquery datepicker desaparecen después de interactuar con datepicker

mi objetivo es un selector de fechas que solo muestra los años. Mi selector de fechas:

 $( "#datepicker" ).datepicker({ defaultDate: new Date(now.getFullYear(), now.getMonth() - 1, 1), changeMonth: false, changeYear: true, regional:"de", dateFormat: 'yy', beforeShow: function(el, dp) { $('#ui-datepicker-div').toggleClass('hide-calendar', $(el).is('[data-calendar="false"]')); }, onChangeMonthYear: function(year, month, instance) { this.month = month; this.year = year; SelectDataPanel.submitRequest(); SelectDataPanel.saveState(); }, });

Teóricamente podría usar

 .ui-datepicker-month { display: none; }

lograr esto. Pero quiero que la funcionalidad y, por lo tanto, el estilo del selector de fecha sea modificable. Es por eso que traté de usar esto:

 var all = document.getElementsByClassName('ui-datepicker-month'); for (var i = 0; i < all.length; i++) { console.log("i = " + all[i]) all[i].style.display = 'none'; }

que puedo ejecutar en una función. Cuando actualizo mi lado, se ve como debería, pero cuando interactúo con el selector de fechas, los meses vuelven a mostrarse. Ese es mi problema.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!