[Xsltforms-support] A curious problem with the date picker - odd months!
Brought to you by:
alain-couthures
From: Philip F. <Phi...@ma...> - 2011-06-08 12:47:55
|
Hello, There appears to be a very curious bug with the date picker that only shows itself under certain circumstances. Here is how to recreate it: 1) Ensure the date of your computer is set to a calendar month that has an odd number e.g. May (yes really!). I used the date 31/05/2011. 2) Open a form (see below for included test case) and using the date picker widget set the date to 21st of February (21/02/2011) in the 'Test Date' control. Notice that the month in the date field is set to March 21/03/2011 and not 21/02/2011 as selected. Now to prove that this is related to the machine's calendar month, go and change the month back to June (an even month), do things like clear the browsers cache and repeat the test. You will see that the month does change this time. I have found this with the 494 release (because I'm using eXSLTForms and its Rich Text Editor widgets) in Firefox 3.6.10 on Windows 7 and it is still happening with the 503 release. Regards Philip Fennell Consultant MarkLogic Corporation Phone +44 (0) 203 402 3619 | Mobile +44 (0) 7824 830 866 email Phi...@ma...<mailto:Fir...@ma...> web www.marklogic.com<http://www.marklogic.com/> This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="/resource/xsltforms/xsltforms.xsl" type="text/xsl"?> <html xml:lang="en" lang="en" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Date Widget Test</title> <xf:model> <xf:action ev:event="xforms-ready"> <xf:setvalue ref="instance('test')/date" value="substring-before(now(), 'T')"/> </xf:action> <xf:bind id="testDate" nodeset="instance('test')/date" type="date"/> <xf:instance id="test"> <data> <date/> </data> </xf:instance> </xf:model> </head> <body> <div> <h1>Date Widget Test</h1> <xf:input bind="testDate"> <xf:label>Test Date</xf:label> </xf:input> </div> </body> </html> |