Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 1 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: JQuery UI formdatepicker
by deka87 on 2012/10/17 8:15:46

Any instructions on how to install it?

Regards,

Deka
Re: JQuery UI formdatepicker
by irmtfan on 2012/7/1 12:08:52

Thank you.
The Jalali or hejira date is completely different from Garegorian date.
the year is 2012 in Garegorian but in jalali it is 1391 and in hejira it is 1433
The days in each month are totally different see below:
le="color: #000000"><?php $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);


i think all definitions and functions can be moved to language folder.
Re: JQuery UI formdatepicker
by culex on 2012/7/1 12:00:40

Quote:

you can see there are some other new functions like HijriDate.
So IMO it is better to move the whole customizations (definitions for Garegorian Calendar and definitions + functions for other calendars) to language folder.


I see I misunderstood the problem a little But I would agree the solution with the language defined javascript dom check is working pretty good.

I use this also in smallworld. Where a seperate language folder contains javascript defines and eventual functions for each language.
Re: JQuery UI formdatepicker
by timgno on 2012/7/1 11:51:30

This is the result in the Italian language:

Resized Image


Send your picture like mine to show me your result
Re: JQuery UI formdatepicker
by irmtfan on 2012/7/1 11:15:29

@ timgno:
you misunderstood me.
Persian and Arabic communities need more localization than just some definitions.
|for example please see the below code i copy and paste from http://hasheminezhad.com/datepicker

this file is: jquery.ui.datepicker-cc-ar.js [Arabic calendar]

le="color: #000000"><?php // Mahdi Hasheminezhad. email: hasheminezhad at gmail dot com (http://hasheminezhad.com) jQuery(function($){ $.datepicker.regional['ar'] = { calendar: HijriDate, closeText: 'إغلاق', prevText: 'السابق', nextText: 'التالي', currentText: 'اليوم', monthNames: ['محرّم', 'صفر', 'ربيع الأول', 'ربيع الثاني', 'جمادى الأولى', 'جمادى الآخرة', 'رجب', 'شعبان', 'رمضان', 'شوال', 'ذو القعدة', 'ذو الحجة'], monthNamesShort: ['محرّم', 'صفر', 'ربيع الأول', 'ربيع الثاني', 'جمادى الأولى', 'جمادى الآخرة', 'رجب', 'شعبان', 'رمضان', 'شوال', 'ذو القعدة', 'ذو الحجة'], dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], dayNamesShort: ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], dayNamesMin: ['أ', 'ا', 'ث', 'أ', 'خ', 'ج', 'س'], weekHeader: 'س', dateFormat: 'dd/mm/yy', firstDay: 6, isRTL: true, showMonthAfterYear: false, yearSuffix: '', calculateWeek: function(date) { var checkDate = new HijriDate(date.getFullYear(), date.getMonth(), date.getDate() + (date.getDay() || 7) - 3); return Math.floor(Math.round((checkDate.getTime() - new HijriDate(checkDate.getFullYear(), 0, 1).getTime()) / 86400000) / 7) + 1; }}; $.datepicker.setDefaults($.datepicker.regional['ar']); }); function HijriDate(p0, p1, p2) { var gregorianDate; var hijriDate; if (!isNaN(parseInt(p0)) && !isNaN(parseInt(p1)) && !isNaN(parseInt(p2))) { var g = hijri_to_gregorian([parseInt(p0, 10), parseInt(p1, 10), parseInt(p2, 10)]); setFullDate(new Date(g[0], g[1], g[2])); } else { setFullDate(p0); } function hijri_to_gregorian(d) { var gregorian = jd_to_gregorian(islamic_to_jd(d[0], d[1] + 1, d[2])); gregorian[1]--; return gregorian; } function gregorian_to_hijri(d) { var hijri = jd_to_islamic(gregorian_to_jd(d[0], d[1] + 1, d[2])); hijri[1]--; return hijri; } function setFullDate(date) { if (date && date.getGregorianDate) date = date.getGregorianDate(); gregorianDate = new Date(date); gregorianDate.setHours(gregorianDate.getHours() > 12 ? gregorianDate.getHours() + 2 : 0) if (!gregorianDate || gregorianDate == 'Invalid Date' || isNaN(gregorianDate || !gregorianDate.getDate())) { gregorianDate = new Date(); } hijriDate = gregorian_to_hijri([ gregorianDate.getFullYear(), gregorianDate.getMonth(), gregorianDate.getDate()]); return this; } this.getGregorianDate = function() { return gregorianDate; } this.setFullDate = setFullDate; this.setMonth = function(e) { hijriDate[1] = e; var g = hijri_to_gregorian(hijriDate); gregorianDate = new Date(g[0], g[1], g[2]); hijriDate = gregorian_to_hijri([g[0], g[1], g[2]]); } this.setDate = function(e) { hijriDate[2] = e; var g = hijri_to_gregorian(hijriDate); gregorianDate = new Date(g[0], g[1], g[2]); hijriDate = gregorian_to_hijri([g[0], g[1], g[2]]); }; this.getFullYear = function() { return hijriDate[0]; }; this.getMonth = function() { return hijriDate[1]; }; this.getDate = function() { return hijriDate[2]; }; this.toString = function() { return hijriDate.join(',').toString(); }; this.getDay = function() { return gregorianDate.getDay(); }; this.getHours = function() { return gregorianDate.getHours(); }; this.getMinutes = function() { return gregorianDate.getMinutes(); }; this.getSeconds = function() { return gregorianDate.getSeconds(); }; this.getTime = function() { return gregorianDate.getTime(); }; this.getTimeZoneOffset = function() { return gregorianDate.getTimeZoneOffset(); }; this.getYear = function() { return hijriDate[0] % 100; }; this.setHours = function(e) { gregorianDate.setHours(e) }; this.setMinutes = function(e) { gregorianDate.setMinutes(e) }; this.setSeconds = function(e) { gregorianDate.setSeconds(e) }; this.setMilliseconds = function(e) { gregorianDate.setMilliseconds(e) }; }


you can see there are some other new functions like HijriDate.
So IMO it is better to move the whole customizations (definitions for Garegorian Calendar and definitions + functions for other calendars) to language folder.

Who's Online

114 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 114


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits