Fork me on GitHub

New Module dev - Itinerary - know of good Date/Time Chooser?  Bottom

  • I'm starting a new module - registered at the NOC, need to register a name, too, soon.

    It will be an Itinerary module - initially aimed at travel schedules (flights, hotel, car, etc.) but will have a flexible "type" set up for the various items so that it can work for just about any simple scheduling thats tied to users and events.

    Question - I plan on using the datetime format to hold the start and end times of events, intinerary items, etc.

    Is there another module (or standalone PHP functions?) that has a good date/time picker (javascript/php/whatever) and/or formatter that will output and input in the datetime format.

    I'm just not too familiar with the php/mysql datetime interaction and formats, and would need something to drop in or at least study for a while.

    Other than that, I think I'm good to go - have my DB setup, pninit and pntables done and working, and just need to code the basic API and gui for a .1 release.

    Any ideas? Thanks for any pointers!

    Nolan M.
    UHEweb
  • I use time(); .. simple and flexible
  • Do you have any GUI code for a nice user calendar to choose the dates with? I'd rather not use drop down lists, and wanted a gui for the date picker as this will be used by non-technical users. A clickable calendar would be perfect, I have used some strictly PHP ones in the past, but wanted to see if someone had one that's more integrated with the pnAPI.

    UHEweb
  • I recently found html_select_date described in detail here. (Exchange the { } for It's not the 100% greatest way, if you're imagining the sort of date selection things that sites like Orbitz and Expedia offer, but it's a quick way to do it until you find something more of what you're looking for.

    If you do find a javascript version of what you're looking for (and I bet there's one out there somewhere), you can always use the literal /literal pnRender/Smarty tags to insert it and get the date from that.
  • Take a look at some of the date/time plugins from the smarty wiki. The 'calendar plugin' looks like it could be useful to you.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks for the very good link mark .. I did not know that Smarty had plugins for calendars

    The one we are using and works great is JSCalendar:

    http://www.dynarch.com/projects/calendar/

    --
    Cytopia - Download Psytrance




    Athens Pub Crawl
  • Thanks for all the leads - I'll look into them icon_smile

    UHEweb
  • I used the calendar from phpCollab wich is nice but the dynarch looks definitly better. wink
  • I think I'm going to use the dynarch calendar...with the Smarty plugin to place it in my templates and set parameters.

    I'll save the format in mysql format so its readable in the database:

    0000-00-00 HH:MM:SS

    and convert to unix time or format the time as needed to calculate or display using mysql's DATE_FORMAT and UNIX_TIME functions. Been playing with them some, and should work fine.

    I have most of my view and display logic done...now just need to add create and modify for the .1 bare-bones version.

    Thanks to all!

    Nolan M.
    UHEweb
  • hey uheweb, did you end up using that calendar and how is it working out for you? i need one now too
  • .8 contains jscalendar.

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"

This list is based on users active over the last 60 minutes.