Announcement

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

    Date.create() get Invalid Date

    SmartClient 8 release, Firefox 3.6.13

    Simply create a staticText and assign to defaultValue the result of function Date.create(), the result is "Invalid Date".

    Code:
    		isc.DynamicForm.create({
    			ID: "startStopForm",
    			valuesManager:"infoValuesManager",
    			//dataSource: "registerDataSource",
    			cellPadding: 5,
    			width: 200,
    			height: 90,
    			numCols:2,
    			//colWidths: [100, "*"],
    			titleAlign:"center",
    			//titleOrientation:"top",
    	        fields:[
    				{title:"Note", name:"note", type:"text", width:200},
    				{title:"Started", name:"started", type:"staticText", width:200, defaultValue:isc.Date.create({})},  
    				{title:"Time", name:"time", type:"staticText", disabled:true, showDisabled:false, width:200, defaultValue:"00:00:00", textBoxStyle:"clockText"}
    	 		]
    	    });

    #2
    isc.Date.create() happens to expect that you will actually pass arguments. If you aren't going to, just use "new Date()".

    Comment


      #3
      Form documentation no arguments is needed:

      Code:
      Date create ()
      	
      Create a new Date object - synonym for new Date(arguments)
      
      Returns:
          type: Date - Date object
      I need it to use instance methods as "toEuropeanShortDate ()"

      Comment


        #4
        You're confused about what isc.Date.create() does - again, it's a trivial wrapper on new Date(). Just actually try new Date().

        Comment


          #5
          Sorry, can you explain me how call toEuropeanShortDate () ?

          Thanks.

          Comment

          Working...
          X