dokuwiki-plugin-bureaucracy
dokuwiki-plugin-bureaucracy copied to clipboard
Formatting of date and time (feature wish)
Cooperation with calendoku: changing the format of date and time values in the template (added via picker) similar to @DATE(<datetime>,%%Y-%%m-%%e)@
(Github tip: You could paste code snippets within backquotes, like your code)
Sorry, I don't understand your question. What would you like to change? What is there with Calendoku?
I have a date field and would like to be able to configure the format. This way, after picking a date with the datepicker, there would be 20151231 or 31.12.2015 in the field instead of 2015-12-31
This would be useful to me too
Slight variation of the parent wish - I'd like if Bureaucracy would use the same date format as Dokuwiki when set in $conf['dformat'] e.g. if the wiki is being used in Australia we want dd-mm-yy but in order to implement that in Bureaucracy I have to do a hack that doesn't survive upgrades... https://www.dokuwiki.org/plugin:bureaucracy#customise_the_date_format
diff -r Original/bureaucracy/helper/fielddate.php Modified/bureaucracy/helper/fielddate.php
38c38
< if (!is_null($value) && !preg_match('/^\d{4}-\d{2}-\d{2}$/', $value)) {
---
> if (!is_null($value) && !preg_match('/^\d{2}-\d{2}-\d{4}$/', $value)) {
diff -r Original/bureaucracy/lang/en/lang.php Modified/bureaucracy/lang/en/lang.php
16c16
< $lang['e_date'] = '"%s" needs to be a valid date in the format yyyy-mm-dd.';
---
> $lang['e_date'] = '"%s" needs to be a valid date in the format dd-mm-yyyy.';
diff -r Original/bureaucracy/script/datepicker.js Modified/bureaucracy/script/datepicker.js
7c7
< dateFormat: "yy-mm-dd",
---
> dateFormat: "dd-mm-yy",
+1 or at least the possibility to change the format from the input