New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date of article broken in persian language by update to 3.4.2 #7298
Comments
Confirmed... |
Is there a JS error logged? |
@dgt41 |
@dgt41 |
This error happened when update "core.js" in joomla 3.4.2 |
Jalali calendar js ARE loaded OK:
The issue looks indeed related to core.js and started with this commit |
seems work: jQuery(document).ready(function() {
jQuery(C.inputField.form).on('submit', function() {
var dateEl = C.inputField || C.displayArea;
var dateFmt = C.inputField ? C.ifFormat : C.daFormat;
if (dateEl && parseInt(dateEl.value) != 0 && dateEl.value != '') {
var date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt, 'jalali');
C.inputField.value = date.print(C.ifFormat, 'gregorian', C.langNumbers);
}
});
}); not work: jQuery(document).ready(function() {
jQuery.fn.addEvent = jQuery.fn.bind;
C.inputField.form.addEvent('onsubmit', function() {
var dateEl = C.inputField || C.displayArea;
var dateFmt = C.inputField ? C.ifFormat : C.daFormat;
if (dateEl && parseInt(dateEl.value) != 0 && dateEl.value != '') {
var date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt, 'jalali');
C.inputField.value = date.print(C.ifFormat, 'gregorian', C.langNumbers);
}
});
}); but, I did not tested it well, as I do not know Persian and all aspects of this language, so cannot be sure for 100% |
@Fedik |
for test |
I tested it and it works here: One should know that when closing or saving the calendar field switches to gregorian for a second. |
@Fedik you right, after enable debug its work :) |
Thanks for the feedback I'm going to close here 😄 |
@infograf768 Yes, with your fa-IR js it works. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7298. |
Exactly |
Just to mention that this is a bad communication problem here, as we already stated that the language files should be updated with the correct code for 3.4.2 #6207 (comment) |
@balvard |
The TT coordination has sent a mail too to the fa-IR Coordinator. |
Just a question : is there someone working on a new calendar datetime picker ? |
Many people tried, without success until now. |
@JoomliC I guess no one 😄 |
@infograf768 i've worked all June to make my calendar module working with Jalali calendar, and yes, it is a challenge to do this! |
@JoomliC internationalisation by http://momentjs.com/ , but to be honest I do not know what there displaied on demo page 😄 : |
Yes for translation, but don't convert the display to Jalali calendar... |
@infograf768 |
check this http://keith-wood.name/calendarsPicker.html |
check this http://keith-wood.name/calendarsPicker.html Do you know what's new about jquery-ui globalize ? (jquery/jquery-ui#986) |
The new fa-IR pack for 3.4.3 now includes the new js files. |
3.4.3 have bug |
I guess rsform needs also an update. You should contact the developer as it is a commercial extension. |
special thanks to all of you for helping out. after updating joomla to 3.4.3 and fa-IR language pack to 3.4.3v2 (the latest one you have mentioned) on Adding new Item (When no date chosen yet), date printed in HTML source in Jalali format , so the datetime picker try to convert it again to Jalali and result will be so wrong date. the only thing that working right, is on submitting form ( when i choose correct date by picker) and save the form, before saving, date converted to Georgian, but again when form loaded, it has printed Jalali date in HTML and again like new state summary: solve proposal: my question: |
excuse me, i wasn't so familiar with rules in here, i opened an issue in K2 getk2/k2#247 |
i got the answer by myself. i clearly found out, date in joomla forms (that are related to database) have to be in Georgian format, and never have to be converted to user language in html source, just manipulating it by javascript in runtime for viewing! |
I upgrade my joomla to 3.4.4 and install v3.4.4 v2 persian lang pack but i have a problem with creation date after update !!!! |
@farazwebman |
@infograf768 |
If it works for Update date but not for Create date, it looks unrelated to the Persian pack Jalali calendar. |
@farazwebman do you get any console errors? |
@dgt41 |
update joomla 3.4.1 to 3.4.2
when edit article, date is broken like #6207
actual problem in joomla 3.4 is back in 3.4.2
in old version after click on save article, jalali date convert to gregorian before submit form but in 3.4.2 date is not converted!
@dgt41
The text was updated successfully, but these errors were encountered: