Home › Forums › Plugin Support › Date / Time Field Order
Tagged: date, date order
- This topic has 6 replies, 6 voices, and was last updated 2 years, 1 month ago by
sourov amin.
-
AuthorPosts
-
March 5, 2012 at 6:41 pm #845March 6, 2012 at 5:17 pm #851
Khaled
MemberIn order to change date format you need to edit two files.
Please follow those steps:1. Open user-meta/views/generateForm.php by text editor (through ftp client)
2. Scroll down to buttom, Find those two lines:
$(“.um_datetime”).datetimepicker({ dateFormat: ‘yy-mm-dd’, timeFormat: ‘hh:mm:ss’ });
$(“.um_date”).datepicker({ dateFormat: ‘yy-mm-dd’ });
change ‘yy-mm-dd’ to ‘mm-dd-yy’
3. Save changes.
4. Open user-meta/assets/js/jquery/validationEngine-en.js
5. find “date” section (line number 72 in version 1.1.1),
remove or comments:
“regex”: /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
add:
“regex”: /^(0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])[\/\-]\d{4}$/,
6. find “datetime” section (line number 82 in version 1.1.1),
remove or comments:
“regex”: /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s?([01][0-9]|[2][0-4]):[0-6][0-9]:[0-6][0-9]\s?$/,
Add:
“regex”: /^(0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])[\/\-]\d{4}\s?([01][0-9]|[2][0-4]):[0-6][0-9]:[0-6][0-9]\s?$/,
7. Save changes.Keep in mind, you should keep backup your updated file before user-meta version update. unless, those file will be overwrite with new version files.
Thanks.
August 18, 2012 at 1:15 am #1910peterjantz
MemberHi khaledsaikat
Do you have also the regex for DDMMYYYY ?
Thanks in advance.
Peter
December 4, 2012 at 6:00 pm #2577idglabs
MemberThank for Info I make same modification for Italian time
December 4, 2012 at 7:25 pm #2578idglabs
MemberIn order to not receive error Java verification field I change it in:
assets\js\user-meta.js
from
jQuery(“.um_date”).datepicker({ dateFormat: ‘yy-mm-dd’, changeYear: true });to
jQuery(“.um_date”).datepicker({ dateFormat: ‘dd-mm-yy’, changeYear: true });bye
September 18, 2023 at 11:52 am #15242Sergio Pérez
MemberI need change lang of datapicker, names of days, months. By default I get the calendar in English and I need it in Spanish (I have the wordpress language in Spanish)
September 20, 2023 at 8:05 pm #15245sourov amin
MemberHi,
Unfortunately, User Meta does not have the language selecting feature specifically in date-picker yet.
However, upon your request, we will consider adding this option in future updates.Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.
