Version 36 (modified by Ryan J Ollos, 7 years ago) (diff)

Refs #9600.

Add custom date fields to tickets


This plugin allows for validating custom fields as dates in tickets. Just set up the field as a custom field, then use these extra options in the trac.ini file: = true
Enable extra date stuff on this field.
fieldname.date_empty = true
Allow this field to be blank.(default value "due_date.value" must be empty)

or use the CustomFieldAdminPlugin to create a date field:

Development News

  • 1.0.4: The jQuery UI was upgraded from 1.7.3 to 1.8.16.
  • 1.0.3: The jQuery UI was upgraded from 1.7.2 to 1.7.3 and the theme was changed to Blitzer, which seems better suited for Trac (#9598).

Currently this will only validate that the given input looks like the specified date format (see below). Date range checking could be added if someone asks nicely enough.

The configurable options are:

format =
valid formats are dmy, mdy, and ymd
separator =
possible values are - or . or /
first_day =
let you change the first day of week (0=Sunday .. 6=Saturday) (as introduced in #1726)

The following options are available since [7192]

months = 1
How many months to show at once?
milestone = false
Use datepicker for milestone due/complete? (format= must match your locale)
weeknumbers = false
Show ISO8601 week numbers?
panel = false
Show a button panel with "Today" and "Done" buttons (at bottom)?
change_month = false
Show a dropdown with month selection?
change_year = false
Show a dropdown with year selection?
match_request =
Use datepicker on arbitrary request paths. Use text fields with class=datepick in your template, and configure the start of request path (in list format), like: match_request = /query,/other_path

There are many other options, but you need to modify the datefield.html template if you want to use them. See

If you have the AutoQueryPlugin installed, you'll need to patch the DateFieldPlugin to work with it, see comment:4:ticket:6796.

Bugs/Feature Requests

DateFieldPlugin now requires >= changeset:7982, or apply the changeset:7982 patch. Alternatively, you can use r3982 which is older, has more bugs and less features.

Existing bugs and feature requests for DateFieldPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:datefieldplugin here].


Download the source zip and unzip it to a folder.

From a command prompt, run ' bdist_egg'. This builds an 'egg' installation file to a new 'dist' directory.

Got to your Trac Admin page, select Plugins, click Browse, select the egg file, then click install.


The 0.11 version works with Trac 0.12.

You can check out DateFieldPlugin from here using Subversion, or browse the source with Trac.


To enable:

datefield.* = enabled

To add a Due Date:

due_date = text = true
due_date.label = Due Date
due_date.value = MM-DD-YYYY
due_date.date_empty = true

To configure:

format = mdy
separator = -
first_day = 1

DateFieldPlugin at version 1.0.3

Recent Changes

16195 by rjollos on 2017-01-21 22:49:11
3.0.0: Set Trac version requirements
14902 by rjollos on 2015-09-15 22:52:02
3.0.0: Release version 3.0.0 of plugin.
14901 by rjollos on 2015-09-15 22:46:43
3.0.0dev: Fixes error in handling of <now> keyword.

The keyword replacement was not being applied to each field independently. Fixes #12512.



Author: coderanger
Maintainer: doki_pen
Contributors: doki_pen, terje

Attachments (4)

Download all attachments as: .zip