Date picker not updating cube

Hi,

I’ve created a page with a date picker dbr, with the following code:

    	<tm1-ui-dbr 
    	  tm1-instance="dev" 
    	  tm1-cube="sys_Variable" 
    	  tm1-elements="New Date, sValue" 
        tm1-date-option="{format:'dd-mm-yyyy'}"
    	  tm1-default-empty=""
    	  ng-model="page.date">
    	</tm1-ui-dbr>

The two problems I’m having:

  • If the “New Date” element is blank in the db, the date picker is showing the cube name “sys_Variable”;
  • When a date is picked, it doesn’t always refresh the db. The form has a number of other DBRs on it, and if the value of any of these change, the page icon changes to a spinning cog and the db is updated. With the date picker, the field will show the new value, but the icon remains the same rather than going to the spinning cog, and the value in the cube is not updated. As soon as another item on the form is changed, the value in the date picker reverts back to the stored value in the cube.
  • The behaviour is not consistent, sometimes the change will be applied, other times not. I have found that if I select a date, then select it again, it will trigger a commit to the db, but generally on the first selection it won’t.

Any advice would be greatly appreciated.

Regards,

Clayton.

Hi @cmcguire,

You are probably using an older version of Canvas. Which version are you on?

The above items you mentioned should be fixed already in the latest released version (i.e. you do not need to add tm1-default-emtpy as it will default to empty instead of the cube name).


Paul

Hi,

You could add to your tm1-ui-dbr tm1-placeholder="Enter a new date"
If there is no date, it will show the string “Enter a new date”

Your DBR will look like:

<tm1-ui-dbr 
    	  tm1-instance="dev" 
    	  tm1-cube="sys_Variable" 
    	  tm1-elements="New Date, sValue" 
          tm1-date-option="{format:'dd-mm-yyyy'}"
    	  tm1-default-empty=""
	  tm1-placeholder="Enter new date"
    	  ng-model="page.date">
</tm1-ui-dbr>

Hi Paul,

I’m on version 1.0.0. Is there a newer version available?

Clayton.

Thanks Vincent. Per Paul’s reply I’ll try upgrading to the latest version, but if it’s still displaying the cube name I’ll update all fields with the placeholder element to make them all consistent.

Regards,

Clayton.

Hi @cmcguire,

The current version of Canvas is v1.1, you can download it from this link:
http://forum.cubewise.com/t/canvas-v1-1/236

cheers,

Vincent