different display format

1,876 views
Skip to first unread message

piro...@gmail.com

unread,
Dec 10, 2013, 10:26:15 AM12/10/13
to bootstrap-...@googlegroups.com
Is it possible to show selected data it some different format
for example internal formai is 'dd/mm/yyyy'  but on ui user can see only 'dd-mm-yyyy'.
JqueryUI datepicker has such option(http://api.jqueryui.com/datepicker/#option-altFormat) and create hidden input under the hood to save data in internal format.
is there any similar options ?

Andrew Rowls

unread,
Dec 10, 2013, 5:15:23 PM12/10/13
to piro...@gmail.com, bootstrap-...@googlegroups.com
I plan to implement an option for this, probably in the next major version (1.4)

In the meantime, you can implement your own version using a hidden input and the `changeDate` event:

<input id="date1" type="text">
<input id="date2" name="date" type="hidden">

$('#date1')
.datepicker({ format: 'dd-mm-yyyy' })
.on('changeDate', function(e){
$('#date2').val(e.format('dd/mm/yyyy'));
});
> --
> You received this message because you are subscribed to the Google Groups "bootstrap-datepicker" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-datepi...@googlegroups.com.
> To post to this group, send email to bootstrap-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bootstrap-datepicker/80cb07a3-9245-4c51-8aab-7e5b6ce8f438%40googlegroups.com.

Vadorequest Mini Vado

unread,
Apr 29, 2014, 9:31:47 AM4/29/14
to bootstrap-...@googlegroups.com
What about this feature? It's been 5 months and still not possible?
I don't know what's the current version, the CHANGELOG looks like being in 1.1.2.
Reply all
Reply to author
Forward
0 new messages