Topic: Please help to use date picker. I copied html code but i don't know how to use javascript ?

Murali Sagar Krishna free asked 4 years ago


Please help to use date picker. I copied html code but i don't know how to use javascript ?


MDBootstrap staff answered 4 years ago


Hi Murali Sagar Krishna,

Please, in the future don't post screenshots of your code. Use markup "``" and copy-paste the code to the site if you don't want to learn how our snippets are working. (the best solution for presenting code: https://mdbootstrap.com/snippets/)

You are closeing body 2 times in this example. Remove tag before footer. Please, try to improve your overall code understanding. We as mdb know that we work with people from complete beginners to experts but in this case, you just didn't check basic syntax errors in your code. To avoid future simple problems please try to read our tutorials https://mdbootstrap.com/education/ Be sure you understand HTML CSS and basics of JS to make your development process easier.

I am here to help you.

Best Regards, Piotr


MDBootstrap staff answered 4 years ago


Hi Murali,

The proper usage of our date picker is shown in our docs: https://mdbootstrap.com/docs/jquery/forms/date-picker/ I can guarantee you it is working properly only needs well-executed initialization. This is how you should implement date picker: https://mdbootstrap.com/snippets/jquery/pjoter-2-0/882919

If you want me to check your code please, create a snippet showing your problem here: https://mdbootstrap.com/snippets/. I'll try to help you.

Best Regards, Piotr



$('.datepicker').pickadate();

Please tell me how above mentioned jscript working with html since nothing is connecting to html

Pick from date

MDBootstrap staff answered 4 years ago


Hi Murali Sagar Krishna,

I see that you copied correct code but you need to post this script initiation code just before this mark </body>. Your script files need to be the last thing in the body after jQ, bootstrap and mdb scripts.

If you need additional help I am here for you. Best Regards, Piotr



I used the codes as mentioned but not working


MDBootstrap staff answered 4 years ago


Hi Murali Sagar Krishna,

To use date picker you need to use copied HTML code and before closing body tag you need to add copied javascript code in script tags. Add this code before this mark "":

<script>('.datepicker').pickadate();</script>

To learn more about javascript try to read our tutorial: https://mdbootstrap.com/education/javascript/

If you need additional help I am here for you.

Best Regards, Piotr



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: pc
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No