FoxInCloud
Different behavior on different devices
Gravatar is a globally recognized avatar based on your email address. Different behavior on different devices
  Michele
  All
  Oct 13, 2020 @ 08:09am

If i work on my app from pc (Windows 10) or from Samsung Tablet with Android i have no problems and i see this main form

If i work from smartphone (more than one, with Android) in the form the date in the bottom of the form is not shown as you can see in the image below

If someone want to check it on the server here is the address 159.8.14.222/acutmobilebs

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 14, 2020 @ 02:05am

Ciao Michele,

http://159.8.14.222/acutmobilebs/ returned Output Error - The COM object returned no output.

You need to check the CSS rule that makes the date invisible:

  • open browser development tools
  • switch to responsive design view (name differs across browsers)
  • select the resolution where you have an issue
  • pick the element selection tool
  • click on the date's parent
  • drill down to the date
  • find the CSS rule that makes it display:none

Bootstrap responsive utilities may help you.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Vincent H.
  FoxInCloud Support - Thierry N.
  Oct 14, 2020 @ 02:56am

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 14, 2020 @ 08:32am

You can try here

frontend.acut.it/acutmobilebs

Accessing is not requested, You can see the problem immediately.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 14, 2020 @ 09:30am

First off, did you try the steps I provided?

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 14, 2020 @ 12:59pm

I didn't find anything I can change. For this I suggested to try at frontend.acut.it/acutmobilebs Because this site was online

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 14, 2020 @ 11:58pm

Tried under Safari and GC with various mobile devices emulations, date was always visible.

If you connect your Android to your PC, Google Chrome should be able to set its developer tools on the Android device. This way you can see what happens.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 15, 2020 @ 12:25am

Tested on my smartphone different browsers.

Chrome date non visible, nothing is shown Firefox date non visible, "dd-mm-yyyy" is shown Opera date non visible, nothing is shown Navi Browser date non visible, nothing is shown Dolphin date is visible

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 15, 2020 @ 12:29am

Michele,

OK, could you connect your desktop Google Chrome to your Android device as I explained earlier?

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 15, 2020 @ 01:15am

Here is the remote debug

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 16, 2020 @ 01:08am

Thanks

Please try with .wlDatePicker=.T. set at design time.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 16, 2020 @ 03:38am

Nothing changes... Even if i set wldatepicker = .F. (and i have still the datepicker)

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 20, 2020 @ 04:21am

Ciao Michele,

Please try this fix:

modify command awServer.prg
…
define class awAJAX …
…
hidden procedure PropChangedHTML_Value
…
&& replace
CASE m.BC == 'Textbox'
	local lcType as String, lDate as Boolean
	lcType = Vartype(m.toControl.Value)
	lDate = m.lcType $ 'DT'
	INSERT INTO PCHTML VALUES (m.BC, m.OA, 'value', 'S', cEscaped_XML(Iif(m.lcType == 'C', Trim(m.toControl.Text), Alltrim(m.toControl.Text))))
	this.cScriptJSAdd(Textmerge([FoxInCloud.inputDate(jQuery('#<<m.OA>>').<<Iif(m.lDate, 'add', 'remove')>>Class('awDate'), <<cLitteralJS(!m.lDate)>>);]))

&& by
CASE m.BC == 'Textbox'
	local lcType as String, lDate as Boolean, lcValue as String, lcYMD
	lcType = Vartype(m.toControl.Value)
	lDate = m.lcType $ 'DT'
	lcValue = Iif(m.lcType == 'C', Trim(m.toControl.Text), Alltrim(m.toControl.Text))
	lcYMD = Iif(m.lDate, Alltrim(cLitteralJS(m.toControl.Value,,.T.), '"'), m.lcValue)
	this.cScriptJSAdd(Textmerge('';
	 + [var $inp = jQuery('#<<m.OA>>'), $type = $inp.attr('type');];
	 + [$inp.val($type === 'date' ? '<<Left(m.lcYMD, 10)>>' : ($type === 'datetime-local' ? '<<Left(m.lcYMD, 16)>>' : <<cLitteralJS(m.lcValue)>>));];
	 + [FoxInCloud.inputDate($inp.<<Iif(m.lDate, 'add', 'remove')>>Class('awDate'), <<cLitteralJS(!m.lDate)>>);];
	 ))

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 20, 2020 @ 08:11am

Tried but nothing seems to be changed..

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 20, 2020 @ 09:38am

Even if you change the date using up / down arrow?

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  Michele
  FoxInCloud Support - Thierry N.
  Oct 20, 2020 @ 09:41am

You can check it on frontend.acut.it/acutmobilebs without accessing Or at 159.8.14.222/acutmobilebs (demo 1) Now even with pc i can't see the date...

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 21, 2020 @ 03:07am

I get this

Failed to load resource: the server responded with a status of 404 (Not Found)

http://159.8.14.222/acutMobileBS/mob.js?2.31.0-beta.4

mob.js is missing

Please make sure to review your development console as the first debugging step.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 21, 2020 @ 03:19am

Please make sure you replaced the code as suggested; this should no longer appear in the server response:

http://159.8.14.222/acutmobilebs/
<r>
  <c>main_scx-_pageframe1-page1-contain-data</c>
  <c>value</c>
  <c>S</c>
  <c>22-10-2020</c>
</r>

After patch, this update is made in JavaScript.

If you're not sure how to apply code patches, please wait until next release where the fixes are implemented.

Gravatar is a globally recognized avatar based on your email address. re: Different behavior on different devices
  FoxInCloud Support - Thierry N.
  Michele
  Oct 24, 2020 @ 01:43am

new thinking… complex combination requiring extra time and tests to fix in all cases

you can try this workaround:

  1. restore original source files (awServer.prg and awHTML.prg)
  2. set at design time or in .Init():
  • txt.controlSource = "DtoC(…)"
  • txt.readOnly = .T.

You should no longer have a date picker (nor native nor BS) and users will change the date using up/down arrows only (no date typing or selection in date picker).

We'll later implement the desired enhancements to handle this kind of control as <input type="date"…>; hopefully you'll have some spare time for testing on your app.

© 1996-2024