This removes .datepicker COMPLETELY:
$( selector ).datepicker( "destroy" );
$( selector ).removeClass("hasDatepicker").removeAttr('id');
Documentation:
https://api.jqueryui.com/datepicker/#method-destroy
also read the comments below
This removes .datepicker COMPLETELY:
$( selector ).datepicker( "destroy" );
$( selector ).removeClass("hasDatepicker").removeAttr('id');
Documentation:
https://api.jqueryui.com/datepicker/#method-destroy
also read the comments below