{"id":39,"date":"2006-08-28T21:22:02","date_gmt":"2006-08-28T21:22:02","guid":{"rendered":"http:\/\/kera.name\/articles\/?p=39"},"modified":"2006-08-28T21:22:02","modified_gmt":"2006-08-28T21:22:02","slug":"give-me-the-time-of-day","status":"publish","type":"post","link":"https:\/\/kera.name\/articles\/2006\/08\/give-me-the-time-of-day\/","title":{"rendered":"Give Me The Time Of Day"},"content":{"rendered":"<p><img decoding=\"async\" align=\"right\" alt=\"The DHTML \/ Javascript Calendar in action\" id=\"image38\" src=\"https:\/\/kera.name\/articles\/wp-content\/uploads\/2006\/08\/calendar.jpg\" \/>In my work creating a fault logging system for a client wanting to improve their support services, I found the need to present editable date and time fields in an HTML form. Clearly free-text for this function is messy and horrible, so I wanted a pop-up DHTML date\/time picker (aka calendar) to do the job for me. The support guy would just click on a little calendar icon next to the input field, then choose a date from a pretty popup.<\/p>\n<p>I&#039;d found a fairly cheap and nasty one which did the job. Although I don&#039;t like to name and shame, I will say that I was using a script called &#034;My Date Time Picker&#034; which had been written late in 2003 and which I&#039;d gotten off <a title=\"HotScripts.com :: Javascript :: Calendars :: My Date Time Picker\" href=\"http:\/\/www.hotscripts.com\/Detailed\/29109.html\">HotScripts.com<\/a>.<\/p>\n<p>It worked. It produced horrible HTML and didn&#039;t use CSS at all, but it worked. I got half-way through attempting to modify its behaviour slightly to follow the <a title=\"Principle of least astonishment\" href=\"http:\/\/en.wikipedia.org\/wiki\/Principle_of_least_astonishment\">principle of least astonishment<\/a> by being a little more intuitive, when I realised that it was a nightmare and wondered just what the hell I was doing.<\/p>\n<p>So I uncharacteristically left the script alone and went on a second surf around the web to find an alternative script to save me all the work, vaguely aware that I&#039;d not searched for long the first time.<\/p>\n<p>And what should I find but the answer to any desires any man or woman could ever have had for a DHTML date\/time picker?<\/p>\n<p><strong>Enter dynarch<\/strong><\/p>\n<p>I&#039;d actually run across dynarch&#039;s <a title=\"The Coolest DHTML \/ Javascript Calendar [dynarch.com]\" href=\"http:\/\/www.dynarch.com\/projects\/calendar\/\"><em>The<\/em> DHTML \/ Javascript Calendar<\/a> before, but seem to recall finding that it was a commercial product. That&#039;s probably because the owner signed an agreement to allow Zapatec to offer <a title=\"Javascript calendar\/dhtml calendar\/Date picker by Zapatec\" href=\"http:\/\/www.zapatec.com\/website\/main\/products\/prod1\/\">their own commercial version<\/a>.<\/p>\n<p>I&#039;ve yet to determine the improvement shown by the pay-for version, as the open-source script is certainly a work of art. dynarch&#039;s script even &#039;interfaces&#039; to a point with PHP, as it comes with a PHP wrapper which makes calling the date\/time picker an absolute breeze.<\/p>\n<p>Right through to the choice of skins (I&#039;m using &#039;Aqua&#039;) the entire thing leaves the web developer end-user with barely any work to do whatsoever. So I&#039;m happy.<\/p>\n<p>Except that I&#039;m starting to inevitably feel a little sorry for the script I dumped. :\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What should I find but the answer to any desires any man or woman could ever have had for a DHTML date\/time picker?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[9,5],"_links":{"self":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/39"}],"collection":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":0,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"wp:attachment":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}