uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.66k stars 6.06k forks source link

Using toValue and toDisplay in the backend #2620

Open DSBhogal opened 3 years ago

DSBhogal commented 3 years ago

I'm using bootstrap datepicker in conjunction with the jQuery Query Builder and I'm trying to display the date in one format and have the value in another format. I've noticed the bootstrap datepicker has two functions which are toValue and toDisplay, I populate my filters in the backend and this is how I configure my datepicker:

image

How would I go about setting the toValue and toDisplay functions in the backend? I've tried to do this in JS but nothing seems to work for me.