Changes between Version 52 and Version 53 of DateFieldPlugin


Ignore:
Timestamp:
Sep 4, 2015, 7:05:25 AM (9 years ago)
Author:
figaro
Comment:

Rearranged paragraphs to maintain consistency

Legend:

Unmodified
Added
Removed
Modified
  • DateFieldPlugin

    v52 v53  
    55== Description
    66
    7 This plugin provides a datepicker for ticket and milestone fields, and validation of the date string for ticket custom fields. It will only validate that the given input has the specified date format (see below). The value is stored in the database as a string, as Trac does not yet have date field support (t:#1942). Note: It will never be the intention of this plugin to provide date-type support.
     7This plugin provides a datepicker for ticket and milestone fields, and validation of the date string for ticket custom fields. It will only validate that the given input has the specified date format (see below). The value is stored in the database as a string, as Trac does not yet have date field support (t:#1942). Note: It is not the intention of this plugin to provide date-type support.
    88
    9 With release 1.0, Trac has integrated the jQuery UI library along with datepicker and datetimepicker extensions into the core. Major changes to this plugin have followed, and the plugin will be obsolete in an upcoming release once the work in t:#1942 and t:#10756 is complete.
    10 
    11 == Usage
    12 
    13 {{{
    14 #!NewsFlash
     9{{{#!NewsFlash
    1510
    1611= Development News =
     
    2217}}}
    2318
    24  1. Install and configure.
    25  1. Pick a date on tickets and milestones:
     19With release 1.0, Trac has integrated the jQuery UI library along with datepicker and datetimepicker extensions into the core. Major changes to this plugin have followed, and the plugin will be obsolete in an upcoming release once the work in t:#1942 and t:#10756 is complete.
     20
     21Pick a date on tickets and milestones:
    2622
    2723'''0.11 branch''' ------------------- '''Development branch'''
    2824
    2925[[Image(DatePickerTrac011.png, 13%)]] [[Image(DateFieldPlugin.png, 15%)]]
    30 
    31 == Installation
    32 
    33  1. '''Install''' globally with:
    34 {{{
    35 #!sh
    36 sudo easy_install https://trac-hacks.org/svn/datefieldplugin/0.11/
    37 }}}
    38  1. '''Enable''' the plugin by updating TracIni file (..../trac.ini) as follows:
    39 {{{
    40 #!ini
    41 [components]
    42 datefield.* = enabled
    43 }}}
    44  1. '''Configure''' the project management support for the plugin in its own configuration section, placed into 'trac.ini' file as follows:
    45     1. To add a Due Date, just set up the field as a [http://trac.edgewall.org/wiki/TracTicketsCustomFields custom field], or use the CustomFieldAdminPlugin (image right) to create a date field: [[Image(customfields.jpg, right, 20%)]]
    46  {{{
    47 #!ini
    48 [ticket-custom]
    49 due_date = text
    50 due_date.date = true
    51 due_date.label = Due Date
    52 due_date.value = <now>  # special value <now> works with 1.0 branch only
    53 due_date.date_empty = true
    54 }}}
    55  The example demonstrated use of the special value `<now>`, which is supported only on the 1.0 branch. The value will be replaced with the current date.
    56     1. Site-wide defaults for macro arguments may be set at [datefield] section. More details about them see [#Arguments #Arguments section].
    57 {{{
    58 #!ini
    59 [datefield]
    60 format = mdy
    61 separator = -
    62 first_day = 1
    63 }}}
    64  1. '''Restart''' web server on command line:
    65 {{{
    66 #!sh
    67 sudo /etc/init.d/apache2 restart
    68 }}}
    69 
    70 === Arguments
    71 
    72 This plugin can be controlled with a number of arguments, inside `[datefield]` section contained in `trac.ini` configuration file:
    73 
    74 ||'''Argument'''  ||'''Version'''  ||'''Description'''  ||'''Default[[BR]]value''' ||
    75 || `format`|| ||The format to use for dates. valid formats are `dmy`, `mdy`, and `ymd` || `dmy` ||
    76 || `separator`|| ||The separator character to use for dates. Possible values are `-` or `.` or `/` || `/` ||
    77 || `first_day`|| >= [6118] ||First day of the week (0=Sunday .. 6=Saturday) || `0` ||
    78 || `months`|| >= [7192] ||How many months to show at once? || `1` ||
    79 || `milestone`|| >= [7192] ||Use datepicker for milestone due/complete fields? (format= must match your locale) If you turn this on, you must use `MM/DD/YYYY` for the date format. Set format to `mdy` and separator to `/`. || `false` ||
    80 || `weeknumbers`|| >= [7192] ||Show ISO8601 week number in calendar? || `false` ||
    81 || `panel`|| >= [7192] ||Show panel with a "Today" and "Done" buttons (at bottom)? || `false` ||
    82 || `change_month`|| >= [7192] ||Show a dropdown with month selection?  || `false` ||
    83 || `change_year`|| >= [7192] ||Show a dropdown with year selection?  || `false` ||
    84 || `match_request`|| >= [7192] ||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'' || `` ||
    85 || `months`|| >= [7192] ||Number of months visible in datepicker  || `1` ||
    86 
    87 There are many other options, but you need to modify the `datefield.html` template if you want to use them. See [http://docs.jquery.com/UI/Datepicker]
    8826
    8927== Bugs/Feature Requests
     
    10745Download the zipped source from [download:datefieldplugin here].
    10846
     47== Installation
     48
     49 1. '''Install''' globally with:
     50{{{#!sh
     51sudo easy_install https://trac-hacks.org/svn/datefieldplugin/0.11/
     52}}}
     53 1. '''Enable''' the plugin by updating TracIni file (..../trac.ini) as follows:
     54{{{#!ini
     55[components]
     56datefield.* = enabled
     57}}}
     58 1. '''Configure''' the project management support for the plugin in its own configuration section, placed into 'trac.ini' file as follows:
     59    1. To add a Due Date, just set up the field as a [http://trac.edgewall.org/wiki/TracTicketsCustomFields custom field], or use the CustomFieldAdminPlugin (image right) to create a date field: [[Image(customfields.jpg, right, 20%)]]
     60 {{{#!ini
     61[ticket-custom]
     62due_date = text
     63due_date.date = true
     64due_date.label = Due Date
     65due_date.value = <now>  # special value <now> works with 1.0 branch only
     66due_date.date_empty = true
     67}}}
     68 The example demonstrated use of the special value `<now>`, which is supported only on the 1.0 branch. The value will be replaced with the current date.
     69    1. Site-wide defaults for macro arguments may be set at [datefield] section. More details about them see [#Arguments #Arguments section].
     70{{{#!ini
     71[datefield]
     72format = mdy
     73separator = -
     74first_day = 1
     75}}}
     76 1. '''Restart''' web server on command line:
     77{{{#!sh
     78sudo /etc/init.d/apache2 restart
     79}}}
     80
     81=== Arguments
     82
     83This plugin can be controlled with a number of arguments, inside `[datefield]` section contained in `trac.ini` configuration file:
     84
     85||'''Argument'''  ||'''Version'''  ||'''Description'''  ||'''Default[[BR]]value''' ||
     86|| `format`|| ||The format to use for dates. valid formats are `dmy`, `mdy`, and `ymd` || `dmy` ||
     87|| `separator`|| ||The separator character to use for dates. Possible values are `-` or `.` or `/` || `/` ||
     88|| `first_day`|| >= [6118] ||First day of the week (0=Sunday .. 6=Saturday) || `0` ||
     89|| `months`|| >= [7192] ||How many months to show at once? || `1` ||
     90|| `milestone`|| >= [7192] ||Use datepicker for milestone due/complete fields? (format= must match your locale) If you turn this on, you must use `MM/DD/YYYY` for the date format. Set format to `mdy` and separator to `/`. || `false` ||
     91|| `weeknumbers`|| >= [7192] ||Show ISO8601 week number in calendar? || `false` ||
     92|| `panel`|| >= [7192] ||Show panel with a "Today" and "Done" buttons (at bottom)? || `false` ||
     93|| `change_month`|| >= [7192] ||Show a dropdown with month selection?  || `false` ||
     94|| `change_year`|| >= [7192] ||Show a dropdown with year selection?  || `false` ||
     95|| `match_request`|| >= [7192] ||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'' || `` ||
     96|| `months`|| >= [7192] ||Number of months visible in datepicker  || `1` ||
     97
     98There are many other options, but you need to modify the `datefield.html` template if you want to use them. See [http://docs.jquery.com/UI/Datepicker].
     99
    109100== Recent Changes
    110101