How to update the date and time in bootstrap datetimepicker when value of field changes?

485 views Asked by At

I am making a time conversion tool. As the bare minimum description I can say that it calculates the time of the city you give in comparison to other.

As you can see in the below image, what I want is to update the value of the bootstrap datetimepicker with the calculated time.

Edit 1: Basically when the value of field is updated using JavaScript the value of date for widget (bootstrap-datetimepicker) should also change.

Edit 2:

Steps to check the problem

  • Choose the time for Pune city.
  • Enter any cities name in the city one text field.
  • The city one time field should now update.
  • Now when you try to update the value in city one field you will observe that the value in field is not matching to the value in bootstrap datetimepicker.

The screenshot of the problem

You can check the code here in the index.html file.

You can check the tool here.

0

There are 0 answers