I'm having some issues with datepicker in jQuery.
I'm trying to put the today date in a field which is a datepicker.
I've tried with:
$('#fecha_alta').datepicker('setDate', new Date());
console.log($('#fecha_alta').datepicker('getDate'));
And
$('#fecha_alta').datepicker('setDate', '+0');
console.log($('#fecha_alta').datepicker('getDate'));
But always log null and also the input shows empty.
What's wrong?