when i try to get date field from collection in my panel code where this field i’m not connected dirctly to it’s dataset but i connected to it by refernce in anther dataset coolection an error apear. this my code
$w.onReady( ()=> {
$w(‘#dataset1’).onReady(()=>{
var date=$w(‘#dataset1’).getCurrentItem(). barithdate ;
var options = { year: ‘numeric’, month: ‘numeric’, day: ‘numeric’ };
$w(‘#text27’).text=date.toLocaleDateString(‘ar-EG’, options);
where barithdate field in client collection and i connecte client collection to booking collection by refernce .where booking collection contain refernce field refer to client collection items .in my page i use booking (R&W)dataset onlyin my pag . this error apears
An error occurred in one of datasetReady callbacks TypeError: Cannot read property ‘toLocaleDateString’ of undefined