Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 views
in Technique[技术] by (71.8m points)

datetime - Bootstrap DateTimePicker time format

I'm using bootstrap datetimepicker plugin in my web.

In this case, I only use time format, like this:

$(function () {
 $('#zone_hora_inicio').datetimepicker({
 format: 'HH:mm'
 });
});

This works perfectly, when I click in my input, I can select time with the plugin.

The problem is when I make an "edit":

When i click in a button, I insert/update the time in the input like this:

$('#zone_hora_inicio').data("DateTimePicker").date(resp.zone_hora_inicio).format('HH:mm');

And works, I can see the time in my input, but when I try to modified the time, click in my input, the plugin doesn't works, I cannot change the time, i don't see the plugin screen to select time...

I think the problem is that when I insert/update the time, I make any wrong, or I have to reiniziate the plugin, i don't know.

What am I doing wrong?

Thanks

question from:https://stackoverflow.com/questions/65641558/bootstrap-datetimepicker-time-format

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...