For some reason posting_date is returning undefined. I have tried console.log(cur_frm.posting_date) in Journal Entry scripts and is coming back undefined.
Returning transaction_date in a Purchase Order script acts as expected, returning whatever the date is set as.
So it looks like in Journal Entry the posting_date is nested in frm.selected_doc. In Sales Invoice and Purchase Invoice (the other doctypes I have checked) it is an element of frm. Anyone have any idea why this is and if it affects any other doctypes?