Hi,
I need a date picker ,Calendar Widget which can be
1) Configured
2) Can show multiple months(two months)
Please advice me as what to do,
Thanks In Advance,
Sudheesh
Hi,
I need a date picker ,Calendar Widget which can be
1) Configured
2) Can show multiple months(two months)
Please advice me as what to do,
Thanks In Advance,
Sudheesh
try richfaces ,its well integrated with swf2,unless u have problem with the license
joe
Thanks for the reply
Am not using JSF , am using Spring MVC...
Any other options..
(I need to show two months cal)..
Sudheesh
I have had some good success using ExtJs (extjs.com) in combination with our Spring MVC forms also using Spring Webflow 2.0.2.
You can lay out your form as a regular Spring MVC form with the date field you wish to use setup as a regular text field. Then ExtJs has some nice calls for their widgets to be applied to an existing element.
Here's a quick example:
This is my date input that lives in a spring managed form.
This is the javascript to attach the ext date field to my form element, which then provides a rich, robust, and even configurable date chooser that looks sweet too.Code:<form:input id="reportDate" path="runForDate" />
The 'applyTo' attribute tells ExtJs to apply the new DateField object onto the element with the matching id, 'reportDate'.Code:var setupForm = function() { var date = new Ext.form.DateField({ width: 90, allowBlank: false, blankText: 'The report date is required', applyTo: 'reportDate' }); }; Ext.onReady(setupForm);
Hope that helps
browncow
Thanks for your reply.
Can I use the extjs facilities commercialy?
Is there anyway to customize the Dojo Calender that comes with Spring webflow?
Do anybody know more abt the usage of Dojo Calender along with Spring webflow?
Thanks In Advance,
Sudheesh
Or use the Spring JavaScript extension, it is part of the new webflow distribution but works perfectly without Webflow. It is quite easy to integrate.
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan
Thanks a lot for your reply,
This may help me a lot
Do we have any examples?
Do I need to download any extra Jar for this
As I mentioned it is part of Webflow 2, so download it, read the documentation and take a look at the samples.
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan
Marten, thanks for the suggestion. I'm trying to use the calendar widget from spring javascript but i'm running into css problems and my calendar is not rendering correctly (no icons shown on the calendar object).
Code from the html head section
code from my jsp pageCode:<head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" /> <link href="css/style.css" rel="stylesheet" type="text/css"> <script language="JavaScript" src="js\tableH.js" type="text/javascript"></script> <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script> </head>
Code:<form:input path="dateDemarrage" /> <script type="text/javascript"> Spring.addDecoration(new Spring.ElementDecoration({ elementId : "dateDemarrage", widgetType : "dijit.form.DateTextBox", widgetAttrs : { datePattern : "MM-dd-yyyy", required : true }})); </script>
Last edited by tapha; Feb 19th, 2010 at 11:41 AM.
For starters your page is invalid, the link loading your style.css is invalid, or the element is because it isn't closed.
Is it being rendered/acting as a calender widget? Try specifing the id attribute on the form:input because the path is not the same as the id...
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan