Alarm filter using start and end date popup calendar

Hello,

@lachguerabdallah thank you for your suggestion. I’m trying your solution for the popup window but the following error occurs.

Traceback (most recent call last):
File “event:actionPerformed”, line 5, in
java.lang.ClassCastException: java.lang.ClassCastException: Cannot coerce value '03/16/2021 00:00 ’ into type: class java.util.Date. Invalid date format.

caused by ClassCastException: Cannot coerce value '03/16/2021 00:00 ' into type: class java.util.Date. Invalid date format.

Ignition v8.1.0 (b2020110211)
Java: Azul Systems, Inc. 11.0.7

following script used for the popup window.

table = system.gui.getWindow(“Main_Windows/Alarms”).rootContainer.getComponent(‘AlarmJournal’)
start = event.source.parent.getComponent(‘Start_Time’).text
end = event.source.parent.getComponent(‘End_Time’).text

success = system.alarm.queryJournal(start, end,‘AlarmJournal’)
table.data = success.getDataset()

if not success:
event.source.parent.getComponent(‘Start_Time’).requestFocusInWindow()

This is my main window for the alarm journal table

This is the popup window used for select start and end date using popup calendar.