• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic Date Picker Date Range  RSS feed

 
KiranKumar Chandrasekhar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All JSF Experts & Users,
I've a requirement where in DatePicker component should show only the current month starting from 1st till today.I tried to use

<hx:validateDateTimeRange minimum="#{startDate}" maximum="#{yesterday}" />

startDate is being retrieved from Database and set to the servlet context like getServletContext().setAttribute("startDate",firstDt);//2007/05/01

But i'm getting Unparsable Exception:-------------------------------------
javax.faces.convert.ConverterException: Unparseable date: "#{startDate}"
Unparseable date: "#{startDate}"
Unparseable date: "#{startDate}"
at com.ibm.faces.taglib.html_extended.ValidateDateTimeRangeTag.changeDateToLong(ValidateDateTimeRangeTag.java:228)
at com.ibm.faces.taglib.html_extended.ValidateDateTimeRangeTag.calculateTime(ValidateDateTimeRangeTag.java:181)
at com.ibm.faces.taglib.html_extended.ValidateDateTimeRangeTag.evaluateExpressions(ValidateDateTimeRangeTag.java:142)
at com.ibm.faces.taglib.html_extended.ValidateDateTimeRangeTag.createValidator(ValidateDateTimeRangeTag.java:127)
at javax.faces.webapp.ValidatorTag.doStartTag(ValidatorTag.java:109)
at com.ibm._jsp._defectEntry._jspx_meth_hx_validateDateTimeRange_0(_defectEntry.java:889)
at com.ibm._jsp._defectEntry._jspx_meth_h_inputText_0(_defectEntry.java:921)
at com.ibm._jsp._defectEntry._jspService(_defectEntry.java:324)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:250)
at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:201)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:250)
at qty.DefectEntry.forwardJSP(DefectEntry.java:624)
at qty.DefectEntry.doGet(DefectEntry.java:212)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))---------------------------------------------------------------------
I'm unable to find the solution for the same.Please help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!