Jump to content

Search the Community

Showing results for tags 'date'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I'm trying to build a date input field with following functionality: - Date can be manually typed using format dd.mm.yyyy - Date can be selected using datepicker (which should output the date in dd.mm.yyyy format) The problem is that the date field only accepts dashes (-) as a separator so the date must be entered using format mm-dd-yyyy. Also, when a date is selected using datepicked, it is outputted in mm-dd-yyyy format. How can I change the format to dd.mm.yyyy? I tried to change the format settings but it had no effect. My settings: I'm using Processwire 2.3.0. EDIT: The datepicker works correctly in admin section but not in my front-end custom page.
  2. Hi everyone, I'm wondering what the best way to sort a page by date is. I have a few pages that render a list of pages based on specific criteria, e.g. template. I want to provide 2 date pickers on each of those pages to allow users to search by date range on that specific page. I'm wondering what the best way to go about it is. The date has formatting attached to it. I'm wondering if I should use the unformatted version instead of the formatted one. Would this make it easier to work with in this situation? I was thinking of using jQuery UI datepickers and a button to submit the form and apply the date range filter to the results that are rendered on the page. if($page->id == 1) { $events = $pages->get("name=event")->children; } else if($page->name == 'users') { $events = $pages->find("created_users_id=$username, template=log-item"); } else { $sort_type = $page->template; $events = $pages->find("$sort_type=$page"); } if(count($events)) { foreach($events as $event) { // ... } } The date I will be working with has been stored in the $page->date_start field. Currently it is formatted using ProcessWire's options. I'm wondering what the best way to tie date filtering functionality into the above query would be, if even possible, and if not, which way should I go about doing it? Thanks!
  3. Hi everyone, thanks in advance for your help. I have an Event set up using a datetime field. I'm trying to grab the earliest event that has not yet passed, e.g. soonest upcoming event. This is what I have so far. <?php $today = mktime(0,0,0,date("m"),date("d"),date("Y")); $events = $pages->find("template=calendar-event, sort=calendar_event"); foreach($events as $event) { $date = $event->getUnformatted('calendar_event'); if($date > $today) { echo $event->first()->render(); } } ?> The first() part is throwing an error but I put it here so you can see what I'm trying to do. What would be the best way to go about doing this? Thanks for your help.
  4. DDV

    Date input

    I'm compiling a database with anniversaries and stuff. When I add a date, the date field doesn't accept dates before 01/01/1902. Is there a limit? What if I want to add dates 'bc' like the birth of Cicero, January 3, 106 BC?
  5. Hi all, I have some pages with a custom datefield who stores the birth of the person. I want to show a list with the birthdays of the current month but i don't now how to get all the pages that match the condition. I know that this doesn't work but it reflex what i'm trying to achieve: $today = getdate(); $currentmonth = $today[month]; //november $people = $pages->get("/people/")->find("birthday~=$currentmonth"); //voila i get all the people who born on november! birthday is an custom datefield... Anybody could spare me a tip? Thanks!
×
×
  • Create New...