I am currently trying to completely remove a datepicker element from the DOM, if the device being used doesn't have a touch screen. (.no-touch). And replace it with a select menu. Unfortunately my parsley validation is still showing from datepicker, even if I hide the element with pure CSS. I think I can use modernizr to do so. But I am having some difficulty getting it to work. Here is the code I have right now.
if (!Modernizr.inputtypes.date) {
$('html.no-touch .datepicker').datepicker({
disabled: true
});
}