问题
I need a responsive date picker for travel site. I've tried lots of Google searches but can't find any responsive date picker except pickadate.js but I want to show two months at a time...
I also tried to make the jQueryUI date picker responsive like:
@media (max-width: 480px) {
#ui-datepicker-div{ width:70%!important;}
.ui-datepicker-multi, .ui-datepicker-group {float: none!important;}
.ui-datepicker-multi-2 .ui-datepicker-group{width:100%!important;}
}
but the problem is the calender open in up direction; see the attached photo
回答1:
Try using this,
jtsage/jquery-mobile-datebox
OR
jQuery UI's Datepicker Styled for mobile
回答2:
@media (max-width: 622px) and (min-width: 1px){
#ui-datepicker-div{ width:90%!important;}.ui-datepicker-multi, .ui-datepicker-group {float: none!important;} .ui-datepicker-multi-2 .ui-datepicker-group{width:100%!important;} }@media only screen and (max-width: 622px) and (min-width: 1px) { .ui-datepicker-group-last{ display:none!important; }}
来源:https://stackoverflow.com/questions/18864675/need-a-responsive-datepicker-rather-than-pickadate-js