简体   繁体   中英

Add jQuery Calendar plugin to gvNIX sample project

I am trying to add a jQuery calendar plugin, located at http://keith-wood.name/calendarsPicker.html to the gvNIX project sample which uses a datePicker (I just wanted to see how it works). My goal is to replace this datePicker with the plugin provided by K.Wood. to have calendars other than gregorian. Unfortunately i did not succeed in doing so. Here is the file i think i should modify from the gvNIX project http://pastebin.com/5uvuDzfg

I am not a Javascript developer, so i do not know where to call the new calendar to make it work.

Thank you for your time.

If someone need it i write what i have done. I implemented the Jquery plugin but to replace the current date picker i changed for dojo, because Roo using it. https://dojotoolkit.org/reference-guide/1.9/dojox/date/umalqura.html I change the load-script to load the desired dojo.js files and create a copy of the datetime tag to modify it with my new picker. ( For being able to set a new tag you need to recompile the project once ). My datePicker is working well. It stored the date in gregorian any way.

In the load-script

 <spring:url value="/dojox/date/umalqura.js" var="umalqura_url" />
   <spring:url value="/dojox/date/umalqura/Date.js" var="umalqura_date_url" />
   <spring:url value="/dojox/date/umalqura/locale.js" var="umalqura_locale_url" />
...
<script>dojoConfig = {parseOnLoad: true}</script>
...
  <script language="JavaScript" type="text/javascript">dojo.require("dijit.form.DateTextBox");</script>

And in the new datetime.tagx

<input id="_${sec_field}_id" name="${sec_field}" data-dojo-type="dijit.form.DateTextBox" datePackage = "dojox.date.umalqura" constraints="{datePattern:'EEEE dd MMMM yyyy'}" />

I did not figure a way to convert back the date when displaying because it's in gregorian in database. I tried the same with a input to only register the string, but even then dojo convert it in gregorian.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM