Hijri calender

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Hijri calender

kumarbalu83
Hi,

I want to use Hijri calender, can any one provide me with sample code
what files need to be referenced and sample code.

I saw this post
http://dojotoolkit.org/reference-guide/dojox/date/islamic.html#islamic-calendar-package
but I couldn't figure out the files to be referenced


Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

Andree
Hi

basic steps to include dojo into your page, you could find here.

http://dojotoolkit.org/documentation/tutorials/1.6/hello_dojo/

There also you will find how to do embed dojo modules into your page,
like the calendar.

Andree

On 19.01.2012 13:05, kumarbalu83 wrote:

> Hi,
>
> I want to use Hijri calender, can any one provide me with sample code
> what files need to be referenced and sample code.
>
> I saw this post
> http://dojotoolkit.org/reference-guide/dojox/date/islamic.html#islamic-calendar-package
> but I couldn't figure out the files to be referenced
>
>
> Thank you.
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Hijri-calender-tp3672147p3672147.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

kumarbalu83
Hi,

thanks for the quick reply.
I have followed the tutorial and added dojo basic file and required modules, but am getting an error
"uncaught exception: Could not load cross-domain resources: dojox.date islamic.locale"

below is the code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"></script>    <script type="text/javascript"> dojo.require("dojox.date.islamic"); dojo.require("dojox.date.islamic.Date"); dojo.require("dojox.date islamic.locale"); </script></head>
<body>
<input id="hijcal"
     name="noDOMvalue"
     value="2009-03-10"
     type="text"
     data-dojo-type="dijit.form.DateTextBox"
     datePackage = "dojox.date.islamic"
     constraints="{min:'2008-03-01',max:'2009-04-01',datePattern:'dd MMMM yyyy'}" />
</body>
</html>

Any suggestions?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

Adam Peller
kumarbalu83 wrote
I have followed the tutorial and added dojo basic file and required modules, but am getting an error
"uncaught exception: Could not load cross-domain resources: dojox.date islamic.locale"
It appears the dojox.date code was never fully converted to AMD, so it's not working from the CDN.  At least that's the problem in 1.7, I'm not sure exactly why it's not working in 1.6.  In the meantime, you may have to install Dojo locally from download.dojotoolkit.org to use this code.
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

kumarbalu83
Hi, I have downloaded both the 1.7.1 and 1.6.1 version, even when I reference the core file from any of these versions, the same error comes up Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

kumarbalu83
Hi, I found the reason for this problem, its silly mistake, i copied the code from the example and there is a space in dojo.require("dojox.date islamic.locale"); I have corrected this, But no calender opens up on click of the text box and also I want to open the calender from a javascript function, and I am using below line of code for that dijit.byId('hijcal').openDropDown(); (picked it from this post http://dojo-toolkit.33424.n3.nabble.com/trigger-dijit-form-DateTextBox-by-dijit-popup-open-td3171411.html;cid=1326967615364-951) but that is giving an error code <nabble_embed> <script type="text/javascript" djConfig="parseOnLoad: true" src="dojo-release-1.6.1/dojo/dojo.js" /> <script type="text/javascript"> dojo.require("dojox.date.islamic"); dojo.require("dojox.date.islamic.Date"); dojo.require("dojox.date.islamic.locale"); </script> <script type="text/javascript" > function OpenDate() { dijit.byId('hijcal').openDropDown(); return false; } </script> </head> <body> <input id="hijcal" name="noDOMvalue" value="2009-03-10" type="text" data-dojo-type="dijit.form.DateTextBox" datePackage = "dojox.date.islamic" constraints="{min:'2008-03-01',max:'2009-04-01',datePattern:'dd MMMM yyyy'}" /> <button onclick="return OpenDate();" value="date"></button> </body> </html> </nabble_embed> If I am using the file reference from <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"></script> it is throwing an error: Bundle not found: islamic in dojo.cldr , locale=en-us [Break On This Error] can any one provide me a sampel html page with the code to use Hijri calender Thank you. ...te.id==id)){return te;}else{var eles=_1a6.all[id];if(!eles||eles.nodeName){eles=...
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

Faraz
Hi,

I stumbled at the same problem. Cant get it to show the widget. I replaced the
space with the ".", but still nothing. Appreciate some tips on how to get it
working.

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
M.K
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

M.K
This post was updated on .
Faraz wrote
I stumbled at the same problem. Cant get it to show the widget. I replaced the
space with the ".", but still nothing. Appreciate some tips on how to get it
working.
Hi,

I have downloaded release 1.7.2 and noticed that the Hijri calendar is not working too, after investigating the matter! it turned out that the dojox.date.islamic  package is missing some required methods, in order for this to work you need to implement the following on the package level:

dojox.date.islamic.getDaysInMonth = function (/*dojox.date.islamic.Date*/month) { ..

dojox.date.islamic.add = function (/*dojox.date.islamic.Date*/date, /*String*/interval, /*int*/amount) {.. 

dojox.date.islamic.compare = function (/*dojox.date.islamic.Date*/date1, /*dojox.date.islamic.Date?*/date2, /*String?*/portion) {..

dojox.date.islamic.difference = function (/*dojox.date.islamic.Date*/date1,/*dojox.date.islamic.Date?*/date2, /*String?*/interval) {..

After I implemented these it worked prefectly

Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

Adam Peller
In reply to this post by kumarbalu83
For a working example, please see the test in the dojox/date package:

http://download.dojotoolkit.org/release-1.7.2/dojo-release-1.7.2/dojox/date/tests/test_DateTextBoxIslamic.html

Note that the CDN bug has been fixed in 1.7.2:

http://bugs.dojotoolkit.org/ticket/14646

-Adam
M.K
Reply | Threaded
Open this post in threaded view
|

Re: Hijri calender

M.K
Adam Peller wrote
For a working example, please see the test in the dojox/date package:

http://download.dojotoolkit.org/release-1.7.2/dojo-release-1.7.2/dojox/date/tests/test_DateTextBoxIslamic.html

Note that the CDN bug has been fixed in 1.7.2:

http://bugs.dojotoolkit.org/ticket/14646

-Adam

Thanks Adam, I didn't notice the methods were already implemented in dojox\date\islamic.js. All I needed to do was to require "dojox/date/islamic" & "dojox/date/islamic/locale" scripts.


Thanks again.