feature in regional settings - date
7 posts by 3 authors in: Forums > CMS Builder
Last Post: April 9, 2009 (RSS)
By flamerz - February 8, 2009
Best regards.
Re: [flamerz] feature in regional settings - date
By Dave - February 9, 2009
What format should the Created By and Last Updated dates be in if this was changed? Currently they are like this:
May 30th, 2008 - 11:28:48 AM
interactivetools.com
Re: [Dave] feature in regional settings - date
By flamerz - February 9, 2009 - edited: February 10, 2009
Only two items in combo:
dd/mm/yyyy
mm/dd/yyyy (this order is now in cmsbuilder)
this post is related:
http://www.interactivetools.com/iforum/gforum.cgi?post=66194
/cmsAdmin/lib/menus/default/edit_functions.php
swap lines:
print " <select name='{$fieldSchema['name']}:mon'>$monthOptions</select>\n";
print " <select name='{$fieldSchema['name']}:day'>$dayOptions</select>\n";
Re: [Dave] feature in regional settings - date
Re: [guido_ch] feature in regional settings - date
By Dave - February 10, 2009
interactivetools.com
Re: [Dave] feature in regional settings - date
By flamerz - April 9, 2009 - edited: April 9, 2009
In editField.php, under showtime DIV (line 196 or so) add this:
<div class="label">Date Format</div>
<div>
<input type="hidden" name="euroStyle" value="0"/>
<input type="checkbox" id="date_eurostyle" name="euroStyle" value="1" <?php checkedIf($field['euroStyle'], '1') ?> />
<label for="date_eurostyle">European style date format (day, month, year)</label>
</div>
This will let you check european style date in cms.
In editField_functions.php
under line 20: $defaultValue['showTime'] = '1';
$defaultValue['euroStyle'] = '1'; // add this one
in line 278, fix date with:
'date' => array('customColumnType', 'order', 'label', 'type', 'isSystemField', 'adminOnly', 'isUnique', 'showTime', 'euroStyle', 'showSeconds', 'use24HourFormat', 'yearRangeStart', 'yearRangeEnd'),
and last.. in edit_functions.php around line 307 make this changes:
if ($fieldSchema['euroStyle']) {
print " <select name='{$fieldSchema['name']}:day'>$dayOptions</select>\n";
print " <select name='{$fieldSchema['name']}:mon'>$monthOptions</select>\n";
}
else {
print " <select name='{$fieldSchema['name']}:mon'>$monthOptions</select>\n";
print " <select name='{$fieldSchema['name']}:day'>$dayOptions</select>\n";
}
I hope this helps. Please, check my code, i fixed without check in deep.
Re: [flamerz] feature in regional settings - date
By Dave - April 9, 2009
Thanks!
interactivetools.com