title: HTML/JS Bootstrap Datetimepicker change format base on js event
body: <p>I am working with the datetimepicker using bootstrap, it is okie for me to create the datetimepicker with difference format</p>
  
  <pre><code>startPicker = $('#datetimepickerstart').datetimepicker({
      format: time_format,
      language: 'en'
  });
  </code></pre>
  
  <p>time_format is valid string for the datetime format.
  But, my question: Is there any way to change that format after the datetimepicker initialized.
  For example. I have radiobutton to change the format, once the radiobutton clicked, I need to change format correctly.
  I have tried: </p>
  
  <pre><code>$('#range_include_time_option .btn-small').click(function () {        
      if ($(this).attr("value") == 'range_dateonly') {
          startPicker.format = 'yyy-MM-dd';
      } else {
          startPicker.format = 'yyy-MM-dd hh:mm:ss';
      }
  });
  </code></pre>
  
  <p>But the datetimepicker still be the same as it is initialized.
  I also have tried with </p>
  
  <pre><code>if ($(this).attr("value") == 'range_dateonly') {
      $('#datetimepickerstart').datetimepicker({
          format: 'yyyy-MM-dd',
          language: 'en'
      });
  } else {
      $('#datetimepickerstart').datetimepicker({
          format: 'yyyy-MM-dd hh:mm:ss',
          language: 'en'
      });
  }
  </code></pre>
  
  <p>But it doesn't work.
  Please help me, is this a existing problem with the bootstrap datetimepicker or some thing wrong in my code</p>