Morning all,
Anyone ever come across this before? Is it a bug within NetSuite or expected behaviour?
If I put a format.parse with the type being format.Type.DATE, it seems to like it but seems odd to me
b
battk
04/29/2021, 2:14 PM
Use a Date with setValue, use a string with setText
r
Ryan J
04/29/2021, 2:15 PM
Ah that makes sense.
Suppose you don't know if moment is already a Date object? I think it is but not 100% sure
s
Sandii
04/29/2021, 2:22 PM
moment is not a date object, its an object
r
Ryan J
04/29/2021, 2:22 PM
Thanks @Sandii
s
Sandii
04/29/2021, 2:23 PM
you can
toDate()
though
Sandii
04/29/2021, 2:23 PM
99% of the time, just put the moment string in the format of the user/system and use setText
👍 1
b
battk
04/29/2021, 2:32 PM
you should use N/format unless you dont need to worry about different users having different date/time/timezones formats