Pick your dates carefully!

You don’t have to be an “expert-level iDempiere user” to find yourself in a situation, where you must pick an appropriate date range for various reasons. Whether you want to see Order Details or search for some information at the Invoice Info window, you have most likely already met the little “history” icon next to date input fields (Date Picker Icon). After clicking on it, the Date Picker appears for you in its full glory.

The Date Picker used in Order Detail’s Date Ordered parameter in Garden World.

iDempiere’s Date Picker

The Date Picker was introduced in iDempiere v10 as a contribution from our team at Cloudempiere to the community. Its purpose is to open new perspectives when it comes to defining and picking date ranges in iDempiere processes, info windows and in the “find window” (which you can reach through the toolbar: (). The Date Picker has currently nine modes, or options, you can choose from:

  • Previous
  • Next
  • Current
  • Ago
  • Before
  • After
  • On
  • Between
  • Quick

Every option gives you a different style and logic for picking date ranges. E.g., picking “Previous 2 Months” will give you the range from the first day of the prior last month to the last day of the previous month. To give an example, in May 2023 this means the range from 2023-03-01 to 2023-04-30. Isn’t it amazing, that you can achieve this by a few clicks, avoiding searching for the right dates through the little calendars, or typing them manually?

The latest improvements

But what if I want to pick an exact time period from the past, e.g., august of 2022? To solve such use cases, we recently improved the Date Picker by the “Ago” option. In this mode, first you can select the time unit (in our case its Month), and then by increasing the numeric offset you can easily find the right time period you need (in our case, august of 2022 was exactly 9 months ago).

Picking date range “9 months ago” with the Date Picker.

Text and Range Picker

A quite hidden feature of the date range fields is, that you can enable showing date ranges in a more attractive, human readable form. To do so, in System tenant you need to find the definition of the given process parameter or info column, set the Date Range Option field to “Text and Range Picker” and voilà, the next time you open the given process or info window, you will be able to display the most common date periods in a human readable form.

Modifying Order Detail’s Date Ordered parameter in System.
The Text and Range Picker used in Order Detail’s Date Ordered parameter in Garden World.

At first glance, the amount of date picking options and various logics can be quite overwhelming, but if you explore all the possibilities, with a little practice it can save you time and also energy. One thing the date picker still can’t do, is to think for you. So especially when working with reports showing a lot of data, always keep in mind: pick your dates carefully!

For more detailed info, read the documentation: https://wiki.idempiere.org/en/NF10_Date_Range_Component