public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nikhil Mohite <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM-7287]: Issue in loading user details on properties panel
Date: Tue, 5 Apr 2022 11:14:41 +0530
Message-ID: <CAOBg0APKmSKost5c44JkMERF654KTKDLqczDcauZ1-U-8k5p5w@mail.gmail.com> (raw)

Hi Hackers,

Please find attached the patch for RM-7287:
<https://redmine.postgresql.org/issues/7287; Issue in loading user details
on properties panel


-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Senior Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*


Attachments:

  [application/octet-stream] RM-7287.patch (1.0K, 3-RM-7287.patch)
  download | inline diff:
diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx
index 0436b6c3..1e425215 100644
--- a/web/pgadmin/static/js/components/FormComponents.jsx
+++ b/web/pgadmin/static/js/components/FormComponents.jsx
@@ -223,6 +223,7 @@ const DATE_TIME_FORMAT = {
 export function InputDateTimePicker({ value, onChange, readonly, controlProps, ...props }) {
   let format = '';
   let placeholder = '';
+  let regExp = /[a-zA-Z]/;
   if (controlProps?.pickerType === 'Date') {
     format = controlProps.format || DATE_TIME_FORMAT.DATE;
     placeholder = controlProps.placeholder || 'YYYY-MM-DD';
@@ -239,7 +240,7 @@ export function InputDateTimePicker({ value, onChange, readonly, controlProps, .
   };
 
   /* Value should be a date object instead of string */
-  value = _.isUndefined(value) ? null : value;
+  value = _.isUndefined(value) || regExp.test(value) ? null : value;
   if (!_.isNull(value)) {
     let parseValue = DateFns.parse(value, format, new Date());
     if (!DateFns.isValid(parseValue)) {


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM-7287]: Issue in loading user details on properties panel
  In-Reply-To: <CAOBg0APKmSKost5c44JkMERF654KTKDLqczDcauZ1-U-8k5p5w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox