Perspective Table View Date Picker

In vision, when Column with date type is set to editable.
When cell is clicked, date time picker will show.

Is this possible in Perspective Table?

The Perspective table doesn't do this by default. To have the picker appear you would need to render the date column of your table as a view, and have an embedded view containing a date picker component.

1 Like

Thanks for confirming that.
So, I setup(ed) an embedded datetime picker by setting the column render property to view and view path point to datetime picker view.

But how do I return the small view output back to the "upper layer" cell?
Or how do I bind each cell in the date picker column, to the parameter of the datetime view?

So I read few forum post about Embedded View on table, but still did not manage to understand.

I have a table with one column that accept object as data (as shown below).

Below shows my render settings, with one param name Date (bidirectional)

I have onEditCellCommit Script below

On testing, the script does not get triggered..
How do I make the onEditCellCommit triggered? and Event.value bind to Date Param of View?

Am I on the right path?

Rather than an on cell commit action you want to have the action on value change of your embedded view date picker.

What this action does will depend on where your table dataset is populated from. E.g. if it's a query binding you'll need to run a query to update that database, if it's a tag binding you'll need to perform a tag write.

What? do you mean the direction of data can only go one way from table to the embedded view but cannot go from view to the table?

If I need to make the data from embedded view go back to the table, I need to go around? in this case i also need to give the cell location into the embedded view so it knows which data it is?

Sorry, I thought it was a bit straight forward than the above.

This makes sense, as this is same strategy with flex repeater.

You can certainly send the value from the view back to the table, but all this does is update the value displayed in your table. It doesn't update the underlying data that is populating your table. To be clear, this would also be the case for any data in your table, whether you have an embedded view or not.

For example, let's say you have a table populated by a query binding. What is displayed in the table is effectively a 'copy' of the results of that query. If you edit a value in the table, you are editing what is displayed in that table. You are not making any changes to the database that is providing the data to the table. If you want to update that data, you would need to run an update query. So in this example, since the value is being modified from an embedded view, the action to update the data should happen from the embedded view, rather than from the onCellCommit action from the table in the parent view.

1 Like

Got it, I will pass row and column data to the view. (I will still figure out how to do that). Then apply value change script( if you mean property change script), use message handler, to update data on the source - in my case the table dataset is the source via dataset.setValue command.