I made a form with Confiforms in Confluence including a Persian calendar field. There is a Filter Control macro to filter the records. But this filter doesn't work fine with Persian dates. Because Persian dates are saved as timestamp but the Persian calendar field displays the date, not the timestamp, and when I want to filter records, I should write timestamp in the Persian calendar field to make filter work.
The problem is I want that when I choose a date, it returned its timestamp to the field instead of date. (See the picture)
Is there any JavaScript/jQuery code to convert a Persian date entry of a field to timestamp?
Edit: The shamsi date format of field entry is d-m-yy (eg. 15-12-1400)
The following function will convert a Persian (Jalali) Date to a Timestamp (UTC based).
You pass the Jalali's year, month, and day to the function and the output is the timestamp in the UTC zone.