{"id":986,"date":"2009-06-29T12:38:13","date_gmt":"2009-06-29T18:38:13","guid":{"rendered":"http:\/\/bililite.nfshost.com\/blog\/?p=986"},"modified":"2009-07-13T10:36:20","modified_gmt":"2009-07-13T16:36:20","slug":"dont-reinvent-the-wheel","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2009\/06\/29\/dont-reinvent-the-wheel\/","title":{"rendered":"Don&#8217;t Reinvent the Wheel"},"content":{"rendered":"<p><strong>See the <a href=\"\/blog\/2009\/07\/09\/updating-timepickr\/\">updated version<\/a><\/strong>.<\/p>\r\n<script src=\"\/inc\/jquery.ui.subclass.js\"><\/script>\r\n<script src=\"\/inc\/jquery.textpopup.js\"><\/script>\r\n<script src=\"\/inc\/jquery.flexcal.js\"><\/script>\r\n<script src=\"\/inc\/jquery.flexdate.js\"><\/script>\r\n<script src=\"\/inc\/jquery.timepickr.js\"><\/script>\r\n<script type=\"text\/javascript\"\r\n  src=\"http:\/\/jqueryui.com\/themeroller\/themeswitchertool\/\">\r\n<\/script>\r\n<p>I needed a date\/time picker and spend a couple of hours making a simple one:<\/p>\r\n<div id=\"themeswitcher\" ><\/div>\r\n<input id=\"datetime\"\/>\r\n<script>$('#datetime').flexdate()<\/script>\r\n<p>Obviously, I didn't spend a couple of hours putting this together. I wrote it quickly, then spend the hours getting it to work even remotely correctly in <a href=\"http:\/\/youngisrael-stl.org\/images\/webdesign.png\">Internet Explorer<\/a>.<\/p>\r\n<!--more-->\r\n<p>Download the <a href=\"\/inc\/jquery.flexdate.js\">code<\/a> and the <a href=\"\/inc\/jflexdate.html\">HTML template<\/a>.<\/p>\r\n<p>But I wasn't fond of the user interface (edit time by typing, then click on date) or the design, so I decided to search for something better and found, via <a href=\"http:\/\/ejohn.org\/blog\/picking-time\/\">John Resig<\/a>, Maxime Haineault's <a href=\"http:\/\/haineault.com\/media\/jquery\/ui-timepickr\/page\/\">timepickr<\/a>.<\/p>\r\n<script>\r\n  $('head').append('<link href=\"\/inc\/jquery.timepickr.css\" rel=\"stylesheet\" type=\"text\/css\"\/>');\r\n  $(document).ready(function(){\r\n    $('#themeswitcher').themeswitcher();\r\n  });\r\n<\/script><input id=\"timepickr\" \/>\r\n<pre><code class=\"language-javascript demo\">\r\n$('#timepickr').timepickr({convention: 12, resetOnBlur: false});\r\n<\/code><\/pre>\r\n<p>Which I like a lot more (I'll have to separate the date from the time-picking, but I think that's the right approach anyway). This should teach me that <a href=\"http:\/\/lmgtfy.com\/\">Google Is My Friend<\/a>. No need to invent everything from scratch!<\/p>\r\n","protected":false},"excerpt":{"rendered":"See the updated version. I needed a date\/time picker and spend a couple of hours making a simple one: Obviously, I didn't spend a couple of hours putting this together. I wrote it quickly, then spend the hours getting it to work even remotely correctly in Internet Explorer.","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,20],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/986"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":24,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions\/1000"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}