17
Views
13
Comments
Solved
DatePicker widget in react not returning time
Question

In react - the DatePicker widget - it looks like you can set a time in the picker, but when the value is written back to the input field it has the correct date, but the time is 00:00:00.  Anyone else seen this and found a fix?

mvp_badge
MVP
Rank: #78
Solution

Hi Jason,

Based on the reported case, I drilled down a bit in the OutSystemsUI DatePicker widget implementation and found that for the DatePicker widget there is a small code missing for the time selection implementation, which was a slight code-change that I incorporated in the attached .oml file. 

See this sample app | Fix - DateTimePicker

Please refer to the attached .oml file


Implemented Points:

  • From the OutSystemsUI module, I cloned the DatePicker widget block to the application module
  • I did some slight code changes in the DatePicker_Fix Block - SelectDate action 
  • Please see the mentioned comments in the respective action flow as well as in the JS node


PS: Please remove the console log statement as well (attached latest .oml file).

Hope this helps you!


Kind regards,

Benjith Sam

RWALabDatePickerFixDemo.oml

Rank: #70

Hi Jason,


I haven't had this problem using DatePicker from OutSystemsUI (I think you are referring to this one).

I made sure I have ShowTime at True and the Handler values are of Date Time type (although by default the naming is StartDate instead of StartDateTime):

 

I attached a sample OML as I couldn't reproduce our issue.


Regards,
João

ReactiveSandbox.oml

mvp_badge
MVP
Rank: #78
Solution

Hi Jason,

Based on the reported case, I drilled down a bit in the OutSystemsUI DatePicker widget implementation and found that for the DatePicker widget there is a small code missing for the time selection implementation, which was a slight code-change that I incorporated in the attached .oml file. 

See this sample app | Fix - DateTimePicker

Please refer to the attached .oml file


Implemented Points:

  • From the OutSystemsUI module, I cloned the DatePicker widget block to the application module
  • I did some slight code changes in the DatePicker_Fix Block - SelectDate action 
  • Please see the mentioned comments in the respective action flow as well as in the JS node


PS: Please remove the console log statement as well (attached latest .oml file).

Hope this helps you!


Kind regards,

Benjith Sam

RWALabDatePickerFixDemo.oml