Hello,
I would like fill my date prompt with the first day of the previous month.
I looked a script on internet and add something like that in my prompt page
<script type="text/javascript">
var today = new Date();
var first = new Date(today.getFullYear(), 0, 1);
var strYesterday = [today.getUTCFullYear(), first.getMonth()+1, first.getDate()].join("-");
genSelectDateHTML("promptDate_from", 'formWarpRequest', "P_Date_from", 'XML', "", strYesterday, , 'Gregorian', 'editBox', 'editBox', , "", "", 1, RANGE_EQUAL_VALUE, true, false, false, false, false, false, "", "", "", "", "", "");
</script>
But it doesnt work I still have the current date in the prompt. Do you have an idea of the issue ?
Thanks
Hi,
If that is the case why not use "_first_of_month (_add_months (current_date,-1))" as a filter expression.
The above expression will always give the First day of previous month.