-
eagle
- Veteran Member
- Posts: 39
- Joined: 2013-01-09 15:38
Post
by eagle » 2021-01-26 14:20
I have trouble using the datepicker setting on several fiels.
Should this work?
Code: Select all
var dv = new AppGiniDetailView();
dv.compact();
new AppGiniField( "date_a" ).toDatepicker();
new AppGiniField( "date_b" ).toDatepicker();
new AppGiniField( "date_c" ).toDatepicker();
-
jsetzer
- AppGini Super Hero
- Posts: 1817
- Joined: 2018-07-06 06:03
- Location: Kiel, Germany
-
Contact:
Post
by jsetzer » 2021-01-26 14:25
Did you model those three fields as DateTime, (not Date)?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readability
AppGini 24.10 Revision 1579 + all AppGini Helper tools
-
eagle
- Veteran Member
- Posts: 39
- Joined: 2013-01-09 15:38
Post
by eagle » 2021-01-26 14:30
jsetzer wrote: ↑2021-01-26 14:25
Did you model those three fields as DateTime, (not Date)?
Yes, all three are DateTime in AppGini and I just checked that they are also datatime in the database.
Only the first field works as intended.
-
jsetzer
- AppGini Super Hero
- Posts: 1817
- Joined: 2018-07-06 06:03
- Location: Kiel, Germany
-
Contact:
Post
by jsetzer » 2021-01-26 14:32
I've just checked and it works for me:
- AppGini_bCqo6wcgfq.png (71.88 KiB) Viewed 2480 times
Code: Select all
// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.dv;
dv.getField("datetime").toDatePicker();
- chrome_KiyCURGS5p.png (17.57 KiB) Viewed 2480 times
Browser cache problem?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readability
AppGini 24.10 Revision 1579 + all AppGini Helper tools
-
eagle
- Veteran Member
- Posts: 39
- Joined: 2013-01-09 15:38
Post
by eagle » 2021-01-26 14:36
> Browser cache problem?
Yes I think it was. While you wrote this last message I tested once more and now it works. Sorry for the false alarm.
Works great now. Thanks!
Eagle
-
jsetzer
- AppGini Super Hero
- Posts: 1817
- Joined: 2018-07-06 06:03
- Location: Kiel, Germany
-
Contact:
Post
by jsetzer » 2021-01-26 14:36
By the way:
Please always use the singleton initialization for dv now.
The old initialization is deprecated since October last year due to problems when developers initialized the same object multiple times at different places, for example in header-extras.php AND again in -dv.js
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readability
AppGini 24.10 Revision 1579 + all AppGini Helper tools
-
jsetzer
- AppGini Super Hero
- Posts: 1817
- Joined: 2018-07-06 06:03
- Location: Kiel, Germany
-
Contact:
Post
by jsetzer » 2021-01-26 14:37
No prob. I'm glad it works for you now! Always remember to clear browser cache after changing js or css, especially if there is something does not work as expected.
See troubleshooting guide here:
https://appgini.bizzworxx.de/support/troubleshooting/
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readability
AppGini 24.10 Revision 1579 + all AppGini Helper tools
-
eagle
- Veteran Member
- Posts: 39
- Joined: 2013-01-09 15:38
Post
by eagle » 2021-01-26 15:01
Thanks again!
Will use the singleton initialization for dv from now on
Eagle.