PxPlus User Forum

Main Board => Discussions => iNomads => Topic started by: PMM_CAI on June 08, 2022, 10:43:16 AM

Title: Calendar Object: 1) display alignment 2) null value
Post by: PMM_CAI on June 08, 2022, 10:43:16 AM
Hello. Using PxPlus 2020. Is there a way to have a calendar object on a multi-line display =above= the m-l instead of below it?

My m-l control is low on the web page, and when the user clicks on the calendar's button, it pops partially below the visible area, and the user has to scroll down a little.

My other question is more to get a sampling of how are people handling the following scenario. If the date multi-line is null, the calendar pops as "Undefined 2000", and the user has to click on the year link, then the month link (the "Undefined") to get to a more approximate date. One solution is to default the date to today's date, but I'm not sure we want to do that in our particular business application. So I'm wondering if there are any creative solutions out there.

TIA!

Paula McKeever
CAI Software, LLC
Title: Re: Calendar Object: 1) display alignment 2) null value
Post by: Mike King on June 08, 2022, 11:11:05 AM
We resolved the Undefined issue in V19 by making the following changes (Red) the inomads.js file at the end of the iDte_Load() function (around line 7760 depending on version)

   if (nMo == -1) nMo = oDt.getMonth() + 1;
   if (nDy == -1) nDy = oDt.getDate();
   
   if ((nYr >= 1600) && (nYr <=3000) && (nMo >= 1) && (nMo <=12) && (nDy >= 1) && (nDy <= 31)) return;
   
   nYr = oDt.getFullYear();
   nMo = oDt.getMonth() + 1;
   nDy = oDt.getDate();
   
   return;


The change should be able to be applied on any version of iNomads.