Znalazlem taki sobie js calendar i w sumie wystarcza jak na moje potrzeby.
Jedyne co jest skopane nie wiedziec czemu to ze to co wybiera dzisiejszy dzien kopie cos w liscie dni.
Tzn np dzis jest 16 i w liscie pojawiaja sie dwie pozycje 16 i znika 17 zamiast wybranego 16 a nastepnie 17itp


  1. var monthtext=['1','2','3','4','5','6','7','8','9','10','11','12'];
  2.  
  3. function populatedropdown(dayfield, monthfield, yearfield){
  4. var today=new Date()
  5. var dayfield=document.getElementById(dayfield)
  6. var monthfield=document.getElementById(monthfield)
  7. var yearfield=document.getElementById(yearfield)
  8. for (var i=0; i<31; i++){
  9. dayfield.options[i]=new Option(i+1, i+1)
  10. dayfield.options[today.getDate()]=new Option(today.getDate(), today.getDate(), true, true) //select today's day
  11. }
  12. for (var m=0; m<12; m++)
  13. monthfield.options[m]=new Option(monthtext[m], monthtext[m])
  14. monthfield.options[today.getMonth()]=new Option(monthtext[today.getMonth()], monthtext[today.getMonth()], true, true) //select today's month
  15. var thisyear=today.getFullYear()
  16. for (var y=0; y<2; y++){
  17. yearfield.options[y]=new Option(thisyear, thisyear)
  18. thisyear+=1
  19. }
  20. yearfield.options[0]=new Option(today.getFullYear(), today.getFullYear(), true, true) //select today's year
  21. }