cidgoh / DataHarmonizer

A standardized browser-based spreadsheet editor and validator that can be run offline and locally, and which includes templates for SARS-CoV-2 and Monkeypox sampling data. This project, created by the Centre for Infectious Disease Genomics and One Health (CIDGOH), at Simon Fraser University, is now an open-source collaboration with contributions from the National Microbiome Data Collaborative (NMDC), the LinkML development team, and others.
MIT License
91 stars 23 forks source link

Implement time and datetime datatypes #391

Closed ddooley closed 1 year ago

ddooley commented 1 year ago

So far DataHarmonizer only has a "date" datatype, which is treated as xsd:date under the hood. It would be good to add a "time" and a "datetime" datatype.

A time-only field would be implemented as xsd:time, and Handsontable has a built-in datatype "time" for that, with validation happening in the cell, as noted by @pkalita-lbl (https://github.com/cidgoh/DataHarmonizer/issues/389, https://handsontable.com/docs/7.4.2/demo-time.html )

The datetime datatype would be implemented as xsd:datetime, YYYY-MM-DDThh:mm:ss. A popup UI control for that needs to be located.

pkalita-lbl commented 1 year ago

My two cents is that I would lean towards just using the standard <input type="datetime-local"> that all modern browsers support, as opposed to hunting down a 3rd party library. I think it's mainly a question of how to wrap that into a custom cell type in Handsontable.

ddooley commented 1 year ago

That looks great, I didn't know that existed now built-in. 10-4 on handson table integration challenge.