Datetime picker plug-in code not working quite right , need allen help ,thx
Datetime picker plug-in code not working quite right , need allen help ,thx
webprophets
Posts: 18Questions: 5Answers: 0
My issue is similar to this post, but I can not solve it by adding the style sheet you gave him.
https://datatables.net/forums/discussion/21163/datetime-picker-plug-in-code
My php page is as below
I am trying to use datetime picker (2)
thx
Allen
This question has accepted answers - jump to:
This discussion has been closed.
Answers
and my php table code is
Hi,
I'm not 100% certain what the issue you are asking about is, but I presume it is related to the fact that the date time picker is shown on load?
It looks like there is a bit of a mix of styles going on. You have the DataTables default style, and jQuery UI for the jQuery UI date picker.
You have also included the Bootstrap date time picker, but not Bootstrap. I think that is the issue. I should perhaps include Bootstrap in the list of dependencies for that plug-in (although it is in the name :-) ).
The ideal solution would be to have a standalone stylesheet for the date time plug-in (GitHub pages are down at the moment, so I can check if there is one - edit - there doesn't appear to be). If there isn' then include that.
Otherwise, the options are to create one, or to load Bootstrap (and possibly update the other components to use Bootstrap).
Regards,
Allan
Continuing the discussion from your other thread - since you are using jQuery UI's date picker already, you could consider using this extension to it (which I found by Googling): http://trentrichardson.com/examples/timepicker/ .
It would probably also require an Editor field plug-in to be written, although it could be heavily based on the built in jQuery UI date one (in fact, almost exactly the same, just initialising a different widget from the look of things - also dropping the HTML5 date input type).
Regards,
Allan
Hi Allen
Your generator automaticaly add the demo.css jquery-ui.css jquery.datatables.css datatables.editor.css and these js file as below
Then I just follow your plugin doc page as below add bootstrap-datetimepicker.css and other two js file. that's all.
https://editor.datatables.net/plug-ins/field-type/editor.datetimepicker-2
And I have already read this post
https://datatables.net/forums/discussion/21163/datetime-picker-plug-in-code
and check the js file load order as your mentioned
Hi Allen
Actually I just wanna use bootstrap datatime picker, not using other timepicker , not using jquery datapicker.
Any suggestions?
Because I follow your bootstrap doc page
https://editor.datatables.net/plug-ins/field-type/editor.datetimepicker-2
but seems stylesheet not quite right.
As your mentioned before,
"You have also included the Bootstrap date time picker, but not Bootstrap. I think that is the issue. I should perhaps include Bootstrap in the list of dependencies for that plug-in (although it is in the name :-) )."
But from your doc
I only need include these three file
//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/2.1.30/css/bootstrap-datetimepicker.css
//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js
//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/2.1.30/js/bootstrap-datetimepicker.min.js
I am little bit confused. Because I just follow your bootstrap plugin document and using your generator.
Why don't you make an example like other functions to make it easier for newbie like me :>
Thank you very much
I have send onsite box message about my html page link
Could you have a look it ?
Thanks
Hi,
Thanks for the reply. The Bootstrap Date time picker library makes an assumption that Bootstrap would be included on the page. I will update the plug-in to explicitly indicate that Bootstrap is required, rather than just implicitly in the name.
There is a Bootstrap example for Editor available on the site here. Generator at the moment doesn't automatically include all of the field required for Bootstrap (I will be writing an update for it in future which will add that option).
So what you want to do is:
JS
andCSS
tabs below the table in the Bootstrap example show the files that are included in that example.You don't have to do step 3, but if you want to use Bootstrap, it makes sense to use it consistently.
Agreed - the plug-ins need specific examples as well. I've added it to the list!
Let me know how you get on with this.
Thanks,
Allan