Download & Extend

Jquery multi calendar systems plug-in

Project:Calendar Systems
Version:6.x-2.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:jQuery

Issue Summary

i found this jquery plug-in supporting multi calendar system , maybe it will help
http://keith-wood.name/calendars.html

Comments

#1

It does indeed, I wonder why i didn't find it before! thanks

#2

i don't know guys , i had an idea if this plug-in can convert any date from any kind of calendar to another ( i didn't test by my self 0 but you can see the converter in the url) why we are bothering ourselfes to patch the core and patch the modules to reach the result

why we can't do some Manipulation with the result by using jquery we just get the date output and convert it and Manipulate the output with the converted result i mean we don't have to convert it on the server side and also we don't have to change it on server side
let's just get the date from any modules or event the core and send them to our java-script function and the java-script do the rest of the work on the output of the page and with this way

i don't know it's just an idea

#3

Boy this is really good news! Great job spotting this Mohamed!!

Did you people check out the conversion and formatting options? SO excited!

#4

by another way letme explane it again

let's escape from the server side claendar conversion and replacing the values

let's just make the server side as a controlpanel for the user to choose the active calendar system for the languges
and what kind of section going effect (Core , CCK , Date API, date picker , views, views Calendar )

then we deal with output to get the dates from it and manipulate it and change it on the output only with the jquery and save the time of patching other modules and we can focus only on our modules without let any updates a big problem for us.

#5

http://keith-wood.name/calendars.html#convert
try the converter it's really good and tested the hijri (islamic) it's working fine.i test it till i reach to year one Hijri from different calendar systems try the Persian calendar

#6

@msm_eg what you're proposing is a good idea however calendar system is much more than just entering a date in different calendar systems. Its purpose is full multi calendar system support and by full i mean what's described here.

http://groups.drupal.org/node/10607
Read "how to integrate" section

#7

Sir i think we can pass all the needed items in that post

for example
see this
http://keith-wood.name/calendars.html#picker

you will notes that the first day is Sunday if you change the calendar to Islamic it become Saturday plus my idea will cover everything plus my idea will not make the calendar system to complex here is a chart explaining my idea

my idea is too simple manipulate what you want on client side and manipulate it again before submit so everything going to be in the core in the normal date we are just playing with the output using regular expression and jquery calendar converter please find the attachment i draw the idea maybe you will get what i mean so this will do a full integration as a result we don't need to work with the database layer and dates query we will just convert the value from the server side to the client side and from the form fields (date picker or normal date field ) to the regular date system that drupal use or the feilds are using so it will be saved normal without worry about database query i will try to write an example in java script how to get the output and get the dates inside it then conver it and replace it with the converted result but i have to see how is the regular expression in java script because i didn't write it a lot in java script

AttachmentSize
calendar.jpg 77.26 KB

#8

with jquery module you can know Leap year, the week number , the day number

check the converter page you will see it there http://keith-wood.name/calendars.html#convert i will search for the first day of the week and if i find it i will tell you

#9

there is a firs day property in the javascript called first day in Islamic for example the value is 6 // The first day of the week, Sun = 0, Mon = 1 so 6 = Saturday please check http://keith-wood.name/js/jquery.calendars.islamic-ar.js

#10

I am not sure I completely understand #7 etc. (that's perhaps because I have little understanding of drupal internals and calendar handling in specific), but if dates are stored as a timestamp database-wise + if things like the first day of the week, date format & calendar type can be a per-user preference (+ one default setting for anonymous users), then what this jQuery project needs to do is take care of the 'presentation' layer. Right?

PS: I initially thought that each supported calendar type should be 'bound' with certain locales, but then I thought it over and saw how this can potentially become a racist thing (since religion and nationality of a user is involved + combined with the fact that they might -temporarily- reside in a country other than their country of birth). So, I guess we can have a default calendar for each locale, but keep it an configurable option.

#11

@klonos i'm like you I'm not a drupal developer but i have some experience with drupal
and because of that why we have to care about patching every single module deal with date or patch the core the idea is making a layer above all converting the dates to our selected calendar

(think about a script analyzing the output and with regular expression can find all date formats and convert them to kind of calendar systems format in the client side)

i believe this can save this module from any updates for the other modules and can jump above them all without need to patch anything
in past i wrote a bot using php (small bot) to archive pages and find out what is not correct in SEO and fix it automatically the idea is near of that

we will make algorithm can find out all the dates in the output and can replace it all after converting them without have to deal with all modules handler

and for example if we converted a date picker in a form and the user picked up a date then clicked submit we will convert the value before submit ti make it the type drupal accept so we will give the user what he wants and give drupal what it wants. that's it so simple so clear don't care about the core don't care about views , cck or anything else we will build a strong date formats finder script .

#12

by the way my idea will not just convert the cck feild or output from the modules only it will convert everything also the content :) imagin the script is running and analyzing the all the html page and replace it that's mean it will convert dates even if inside a content
with Allah welling i will give it a try this week end to make example with javascript to analyze a html page and replace all the dates inside it to start make the idea more clear for all and make it get a shape maybe it will help all of us.

#13

@klonos to follow me the analyzing and converting and replacing will be in the client side the server side will handle the user option (control panel only for the settings that we will use to convert the output) i think now you got the idea

#14

I can see the server-side benefit of this and I like the idea.

#15

This issue can also be related to this http://drupal.org/node/721596

#16

i think we are going to use jquery date picker to provide an input for the date . what do you think?

#17

That would be a very good idea