{"id":428,"date":"2023-03-22T09:59:50","date_gmt":"2023-03-22T09:59:50","guid":{"rendered":"http:\/\/basicwebsitesolutions.com\/blog\/?p=428"},"modified":"2023-03-22T09:59:51","modified_gmt":"2023-03-22T09:59:51","slug":"bootstrap-website-showing-date-picker-using-php","status":"publish","type":"post","link":"https:\/\/basicwebsitesolutions.com\/blog\/2023\/03\/22\/bootstrap-website-showing-date-picker-using-php\/","title":{"rendered":"Bootstrap Website showing Date Picker using PHP"},"content":{"rendered":"\n<p>Using angular, a few of the requests were to make the date into a date picker. I have found the code and wanted to share it here<\/p>\n\n\n\n<p>Enjoy,<\/p>\n\n\n\n<p>Coffee Cup<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script   src=\"https:\/\/code.jquery.com\/jquery-2.2.3.min.js\"   integrity=\"sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=\"   crossorigin=\"anonymous\">&lt;\/script>\r\n&lt;link href=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.6\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7\" crossorigin=\"anonymous\">\r\n&lt;script src=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.6\/js\/bootstrap.min.js\" integrity=\"sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS\" crossorigin=\"anonymous\">&lt;\/script>\r\n&lt;script type=\"text\/javascript\" src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/bootstrap-datepicker\/1.6.0\/js\/bootstrap-datepicker.min.js\">&lt;\/script>\r\n&lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/bootstrap-datepicker\/1.6.1\/css\/bootstrap-datepicker3.min.css\">\r\n\n&lt;script>\n$( document ).ready(function() {\r\n    $(\"#from-datepicker\").datepicker({ \r\n        format: 'yyyy-mm-dd'\r\n    });\r\n    $(\"#from-datepicker\").on(\"change\", function () {\r\n        var fromdate = $(this).val();\r\n        alert(fromdate);\r\n    });\r\n}); \r\n&lt;\/script>\r\n\r\n\t&lt;div class=\"form-group\">\r\n\t\t&lt;label>Date&lt;\/label>\r\n\t\t&lt;input type=\"text\" id=\"from-datepicker\"\/>\r\n\t&lt;\/div>\r\n<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bootstrap Website showing Date Picker using PHP<\/p>\n","protected":false},"author":1,"featured_media":429,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,11],"tags":[130,239,42],"class_list":["post-428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-day-to-day-life","category-php-and-mysql","tag-bootstrap","tag-date-picker","tag-php"],"_links":{"self":[{"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":1,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"predecessor-version":[{"id":430,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions\/430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/media\/429"}],"wp:attachment":[{"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/basicwebsitesolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}