Closed gpuente closed 20 hours ago
Hey @CallmeT-ty, here is an update about this issue:
This issue occurs when you manually enter the datetime (by typing the date instead of selecting it from the picker). If you don't specify a time, the input is not considered complete, and the onChange
event is not triggered. As a result, if the date is entered without a time, it's treated as if no date was entered for the maturity. Since the onChange
event isn't emitted, we can't detect whether the user attempted to enter an incomplete date. This behavior is due to the limitations of the native browser datetime picker, which works in most cases but lacks full flexibility. To fix this issue, we need to implement a custom datetime picker that triggers onChange
events even when an "incomplete" datetime is entered.
I'll explore this alternative: https://reactdatepicker.com/
@gpuente Looks good to me. I was able to create assets without setting a date.
I talked with Teep and apparently this would be the desired behaviour:
IF the asset type = Treasury BIll then Maturity should be compulsory otherwise should be optional
I'll close this issue and make a new one to implement the desired behaviour
When maturity date is set without time, maturity is saved as null:
https://github.com/user-attachments/assets/08826bda-1e09-4f13-99f0-86f163be2175