simsalabim / sisyphus

Gmail-like client-side drafts and bit more. Plugin developed to save html forms data to LocalStorage to restore them after browser crashes, tabs closings and other disasters.
http://sisyphus-js.herokuapp.com
MIT License
1.99k stars 221 forks source link

Bootstrap Datepicker dates are not saved #125

Open alzambo opened 9 years ago

alzambo commented 9 years ago

Hi, using https://github.com/Eonasdan/bootstrap-datetimepicker doesn't save field content. Bye

alzambo commented 9 years ago

I've analyzed the behaviour circumnstances: datas are not saved only if selected through datepicker. They are correctly stored if typed with keyboard (checked with chrome localstorage inspector). This is my js code initialization code:

$(function(){
    $( "form" ).sisyphus({
        autoRelease: true,
        excludeFields: $( "select[name='idAssicurato']" ),
    });
});

This is input field html:

<input name='dataIncarico' type='text' data-inputmask="'alias': 'date'" data-mask class="form-control" value="<?php echo $incarico->dataIncarico ? DateTime::createFromFormat('Y-m-d',$incarico->dataIncarico)->format('d/m/Y') : null;?>"/>

Thank you Alex