HumanSignal / HumanSignal/label-studio

Datetime Tag with `only="time"` Parameter Fails to Display Selected Value

Open
#7,628 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

#### **Description**
When using the `datetime` tag and setting the `only="time"` param, the selected time value fails to display correctly. Symptoms include:
- This value is updated only at the first time of the two selections/inputs, the subsequent changes will make the result empty;
- The exported dataset also lacks this field's value.

In addition, the following error appears in the browser console whenever the value is not properly displayed:
```
Error: [mobx-state-tree] You are trying to read or write to an object that is no longer part of a state tree.
(Object type: 'ClassificationArea', Path upon death: '/annotationStore/annotations/0/trackedState/areas/5hXc7ZWBTH', Subpath: '', Action: '/annotationStore/annotations/0/trackedState/areas/5hXc7ZWBTH.updateAppearenceFromState()').
Either detach nodes first, or don't use objects after removing / replacing them in the tree.
```

#### **Steps to Reproduce**
1. Add two `datetime` tags to config;
2. Add `only="time"` param;
3. Label a task and attempt to select or manually enter a time;
4. Observe whether the data exports correctly;
5. Open the browser console and check for related errors.

#### **Expected Behavior**
- Each change should trigger an update in both UI and model state;
- The exported result set needs to have correct datetime data
- No MobX-State-Tree warnings should appear in the console.

#### **Actual Behavior Screenshot**

![Image](https://github.com/user-attachments/assets/2bd49041-d8ab-4794-99d8-377e77813703)
![Image](https://github.com/user-attachments/assets/5f0de872-183d-49c3-b723-2cb7ae343c06)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.