How can I change the default button action in bootstrap-datetimepicker?

I would like to override the action of the current time button in bootstrap-datetimepicker

. I am making a tool that accepts the current time of a specific city, the name of the city that the user wants. It works the other way around.

So, when the user clicks on the current time button of the city he wants, he should get the current time in the city instead of the system time (which is the default action bootstrap-datetimepicker

).

Check the datetimepicker documentation here:   eonasdan - bootstrap datetimepicker

Check the tool here: Uditchugh Link

Check the tool code here: Github timeconverter

+3


source to share


1 answer


You should be able to achieve what you want using the locale () function of the bs datetimepicker lib.

http://eonasdan.github.io/bootstrap-datetimepicker/Functions/#locale



To do this, you need to have a list of locales associated with your cities.

0


source







All Articles