Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dates prior to 1,000

    Is it possible to enter dates that are earlier than 1,000 and BC dates using form date fields with DateChooser?
    DateChooser keeps resetting the dates like '01/01/01' to '01/01/2001' irrespective of startDate and startYear settings.

    SmartClient 8.2 eval / all major browsers.

    thanks,
    - g

    #2
    Any way to workaround the issue with automatic date resetting to 2001? Setting useTextField:true attribute doesn't help and there is nothing in the docs about this limitation.

    thanks,
    - Gene

    Comment


      #3
      Thanks for the report - we've fixed this in the framework - with nightly builds after today, you can set centuryThreshold on your DateItem to null - that will prevent the automatic conversion of 2-digit years to 4-digits. There was also a fix for a related bug around 3-digit years.

      Comment


        #4
        Thank you for your reply.
        I don't think it's completely fixed though. It's working for 3-digits years but not for 2 or 1 digits.

        Enter a 2 or single digit date in the date field and then click the text field - the date will get transformed to the 20th century. So in case with double digit dates, they're now getting converted to 19xx dates (used to be 20xx dates).

        Code:
        DynamicForm.create({
            ID:"histChart",
            autoDraw:true,titleOrientation:"top",
            fields:[
        		{name:"hist_genetics", 
        			type:"text",
        			required:true, 
        			defaultValue:"Today", 
        			title:"Text field"},
        		{name:"hist_date",type:"date",
        			defaultValue:new Date(),
        			required:true,
        			useTextField:true,
        			//startDate:"01/01/1"
        			centuryThreshold:null,
        			//centuryThreshold:"null",
        			title:"Date",
        			displayFormat:"toUSShortDate",
        			hint:"MM/DD/YYYY"
        		}
        	   ]
        	});
        Also, what would be the format for entering BC dates?

        SmartClient 8.2 Pro nightly (2012-01-18_v82p), reproducible on IE7 and FF9.

        thanks,
        - gene

        Comment


          #5
          The fix had only been made in the 8.3d branch, we've back-ported it now to 8.2p and it will appear in nightlies from tomorrow.

          To use BCE dates, at least upto about BCE 280,000, the JS Date limit, just stick a hyphen in front of them, like

          Code:
          01/01/-43

          Comment


            #6
            I tested this with 02/16 Pro nightly and the issue is still reproducible, 01/01/-43 is not getting accepted. Additionally, I see a regression now. If you enter '01/01/-43' and then click the date chooser icon, the calendar comes up with NaN shown instead of day numbers.

            thanks,
            -g

            Comment

            Working...
            X