date issue incorrect format

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #198244

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.5.8

Hi
A) I create a custom field of type date. when I want to insert date in Default value input , thedate picker appear and when i select an item ; a pop up "incorrect format" appear . This pop up appear when use the date picker in custom fields ( during creation of quand) and when using this field in product .Datepicker work well for predefine fields of type date during creation of product .
How can i resolve this issue ?

B) i understand and see that joomla date picker insert the actual hours next the selected date . Is there a joomla extension that switch ( toogle replace) the default joomla datepicker for a datetimepicker that support date and time ?

C) Can i have more information in the Label format Y/m/d since i can't test this Field of type date for custom field . Does Format is pure rendering override html format in the backend AND Frontend without effect on storage format ? . Can we let this field empty ? IS there a default implicite Format if we let this field empty ?
thank's

Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #198247

Hi,

When you use the Joomla date picker, you should enter a date in the Joomla date format:

%Y/%m/%d

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #198767

it work thank's

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #198911

A) I do some test against a custom field of name quand of type date . After first creation of product i edit it 2 times without change anything but by using save and close . Below the step by step description... it is a nonsense

1-i change ( not create) the custom field of name quand of type date to %Y/%m/%d %H:%M
2-i create a product with a value of the field of type date by using date picker
3-when i choose date the H and M don't appear so i write it manually
4-clik on save and close then in the product listing the date with H and M appear with a message
sucessfully saved .
5 i reedit this product
the field quand we can view the value contain 2015-04-15-08-08
6- i click on save and close
then in the list of the product listing this field value quand contain 2015-04-15-08-08 .
if i continue edit save and close the value disseppear during product edit and list products !!

So .....where is the logic behind this ? . For summarize
1 choose format %Y/%m/%d %H:%M
2 enter manually 2015-04-15 08:08
3 have in final different value after each save and close : the value change from "2015-04-15 08:08" to "2015-04-15-08-08" and then "" . "" mean nothing in the BE html page and in the table field of name quand using phpmyadmin !!!! .


B_) I ll test on the ed to test on the behaviour of date in HKS demo website
HKS Demo site return alert :Successfully Saved
in hikashop demo website like in my joomla 25 website i have this message : "Since Joomla 2.5.24 it is not possible anymore to change the format of dates. If you need a different format, please use the advanced datepicker type of custom field." .
But the advanced date picker is available in HKS demo web site but not in my local joomla 2.5 server BE ! Can i have more information about this new item view in your HKS demo website ?
I have the same behaviour from HKS demo website the date value disseppear after each same step ( edit , save and close button).

C) Nothing related to date format. I discpver when wanted to test the date picker in HKS demo website that the widget for select the type field use a custom height for select item that let view only a sub part of all <option> items with vertical slide and az search input area for filter items . After study it ; the tweak use position layer max-height overflow ( selector of name chzn drop search result) . It seem come from https://github.com/alxlit/bootstrap-chosen . . Here a capture screen after change the height of the widget to view more type items for field "Field type " !! .
Does this widget is part of
-joomla core ( which version ? )
-isis css framework BE ( which bootstrap ? even i think it is 2.3.2)
-hikashop version ? ( which joomla , css framework , hks version )
-custom integration specific for hikashop demo website ?




regard's

Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #198971

Hi,

1. I think that we already told you that the time were not right supported in the date pickers (which are just used for dates).
Like Nicolas wrote ; the best is to use another custom field, composed or dropdown to select the hour and the minutes. (or a list with "hour:minute" if you want some specific steps).
Because the "date picker" which is using the Joomla date picker is very unstable due to the various modification made during the time ; we just can't add that feature into it.
In last Joomla versions ; it is not possible anymore to use custom date formats ; like the error message explained.
So I don't know which Joomla version you're using to not have this error message while saving your custom field ; but our position can't change about that on the Joomla date picker.

2. If you want to use the "advanced date picker", you just have to publish the corresponding plugin.
Because yes, the advanced date picker is a plugin and is provided in all HikaShop packages since HikaShop 2.3.1
You will find several thread talking about that and we write it a lot of times. It is also written in the change log.

We added the plugin "Custom field Date picker" to replace the "simple date" type custom field (thanks to that we avoid issues with the calendar system of the Joomla library and we can also propose more options for the date picker)

3. Chosen is included in Joomla and used by the ISIS template.
We do not activate it in HikaShop ; on the contrary, we have a lot of code in several views in order to deactivate it because it can break a lot of things (like dynamic content creation with dropdown inside).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199041

2) find that client code is from joomla plugin seem difficuklt to detect . thank' for the information

3) choosen .......it seem to be use only in joomla 3 !

thank's a lot for thoses informations

Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #199043

Hi,

Yes, Joomla 3, like the ISIS template :)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199072

Here some capture screen for people that read this post
could be a start for learn plugin and HKS API

1) the plugin configuration and location





2) the use of the plugin in Backend
Comparision beetween simple and advanced plugin
We can see 2 fields are in common and don't know if size is relevant to date or appear here but not use for date picker . Sometimes description let us understand howto use the plug in , but here ; there is no documentation from HKS .




3) example of jumi plugin Description content compare to HKS .
The forum is a must have when the documentation is missing !!
Mijoshop ask me by mail which ecommerce extension i choose after contact them.They have no forum at that time and now they have been banned from JED !!! . Implement software ( web or desktop) need skill and time ... it a shame to be banned for not follow the jed rule .



4)date time picker in CMS
name is relative to calendar picker , date time picker
- joomla 2.5 and 3 don't support date and hour picker ! or information is not easy to find
-K2 seem to support date AND/OR Time
-Seblod use it own date picker
-drupal seem to not support date time even time picker exist
-Wordpress seem the winner with a date time plugin . It is an add on for a plugin see here . IT seem that the plugin is free or commercial but some add on are free since this plugin let developper create custom field like the date time picker .

Is it so difficult to integrate/select ( not implement) a good datetime picker in joomla core ( css php js ) that don't require a Framework ( css js joomla one ) !!?.
Is there documentation to achieve that in joomla core level ?
Joomla and i think CMS have a lot of problem with integration( extension) that need skill and php knowledge !!
Optimize css js code in one file seem difficult when need to reduce delay/time . Time to manage dynamic content ( javascript css) ll be need/ use in the server ( concat 3 files to one ) or in the client side ( load 3 files) !!

regard's

Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #199120

Hi,

4. That's a good question. We actually tried to update the date picker in Joomla with the one we're using for the advanced date picker as it is much more powerful, much more recent and much more nicely done.
The modification was refused because it didn't support some obscure calendar that almost no one is using. And we actually could have added that support, but no one cared to explain us how the calendar worked.
So instead, we added it directly in HikaShop and used it for the advanced date picker fields that Jerome developed a while ago.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199705

I need basic more information about default format dat in joomla , hikashop level refer to this capture screen

1) I you see the capture screen the on of the url use % before d to have %d : why use this % ?
In the default date picker use in hks custom field why there is y-m-d and not %Y-%m-%d .
1a Does date format lettering in joomla follow the php date format lettering ?




2) How can i find the location of rendering date format in joomla 2.5 ( DATE_FORMAT_LC2).It seem i can detect the default values when i try to override this constant but where is define the value ( l, d F Y H:i ) for this constant (DATE_FORMAT_LC2) ? ( file name path/location on OS filessytem)


3)the advanced date picker from hikashop prevent the user to enter date using keyboard key so the only way is to use the default joomla date picker to enter hour/minutes . Fore advanced date picker there is no icon t oselect the date picker mode , clik on input field area call the date picker ! The format of the value return by the date picker should be compatible with the format define for this date field .
















4) if i compare the edit mode during edit picker and advanced picker , i discover that the icon of date that appear for date picker don't appear for advance date picker !! IT don't appear but ll appear if we clik inside the input area !!
4a) If i need date & hour and minute for my custom field , i can't use the advanced date picker ( hks implementation ) right ?
4b) If i use the default date picker , the custom filed mode let me change the format to support date and time but the joomla picker ll return only date but i can then enter the hour manually ... right ?

I think what i writing is not the true and is more complex refer to default date format !!








5) how default value could be choose during creation since Format is not known ( ll be define and store after save ) ! Does this value could be set only after creation ( first save) during Second edition ? after creation , an icon appear at the end of the fields Default value . if i click i have incorrect date value !! incorrect refer to joomla default date format or Custom fields date Format define during creation ? what ll be the default format if no value is set for default value







5) it curbersome to understand at which level is manage date format : php ?, joomla ?, hikashop ?, widget picker ?, storage mysql ?, rendering html ( BE & FE ) in view & edit mode .
understand CMS need understand all the layers wrapper !!! ( take time at beginning but speed dev after this step !!!) .

6) the preview really preview not during the change ( edit custom field date picker) of date format ; only after save ?



7) i would expect information popup when my mouse is hover text label field but nothing to help me understand all the field that appear in the custom field edit mode .





if i simply want to be able to have a custom field of type darte with a format like 2015-06-18 01:30 using whatever picker helper . The format i want for date is %Y-%m-%d %H:%i without using another custom field ( 1 or 2) only for manage hour and minutes !!! .

Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199714

if i use instead %Y-%m-%d %H:%i Y-m-d H:i for advanced date picker in custom field for format and test during product edition the field . I can select a date and hks add "time hour " on it own way . After save the product ; the value of time for advanced date picker become 00:00 see capture screen .

Does advanced hks date picker support hour minute ?



Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199715

the format should be %Y/%m/%d %H:%M and all seem OK ( or better with still problem/ issue ) .
===================
in custom field edit mode


- joomla date picker show for hour/minute actual hour/minute
-hks date picker show wrong hour/minute aka 2015/04/02 H:i and after save 2015/04/02 00:00
we can change the default date value manually but after save close and edit the value disseppear .
I we only use the hsk date picker the value after save/close and edit is still viewavle ( don't cover study storage side )
=============================
in product edit mode for custom field of date
-hks datepicker , select date return 2020/11/27 H:i and after save become 2020/11/27 01:00
if i try to edit the hour manually ( keyboard) set to 2020/11/27 01:42 .... after click on save icon i have 2020/11/27 01:00 . so hikashop seem to prevent me of manually change the value is not set define by the hks date picker !! . does this behaviour could be change ?

it seem for hks date picker we can edit the date but using wrong date format seem disable the edit "keyboard manually" mode ( so only picker mode selection is enable and can be use )

I see on internet a really awesome javascript api that handle manage date and time mix wit ha calendar ... I shure that a javascript guru should base on the available code ( need skill to understand it ) update/enhance hks date picker to date and time picker in less than 1 hour !!

Take so many time ( 4hours) to only givefeedback ( with lot of capture screen) on date format and picker widget . SO joomla has a really big problem for such simple thing ( support time ) !!
for custom field of type hks datepicker , a value of 2020/11/27 01:00 is store in mysql cell like 20201127010000 and type is text utf8_general_ci so nothing relative to time even Mysql support time type ( date of article). The 2 last 0 are for second .
joomla date picker don't do better since the date storage is also of type text !! . I don't mind how custom field are implemented for date but if hour minute seoncd is store in mysql why not support in date picker the hour minute second ? ( even if some items like minute/second should be remove from rendering html page because this information can be forget is not usefull )




If i go to a joomla article and see how parameters date is stor in mysql i see that the type is date time .

Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199719

If we need a filter search on field of "type" ( show as ) date , is it a non sense to use text storage for those kind of data ?

regard's

(even I focus on css html .... i already compile postgresql and web server on linux from source so i know a little bit of admin CLI SQL for not only text/binary but also for raster and geometry / topology )

Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199751

what is strange is that even seblod support Calendar with timestamp storage format ?
but hikashop product can 't be extend by seblod !!!
seblod use code.google.com/p/blackboxbus/source/bro.../css/jscal2.css?r=38 but there is the same bug for minute area ( appear month text instead number minute )






Attachments:
Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #199754

Hi,

It's not strange ; they have their own calendar library to do so.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
9 years 7 months ago #199761

iF i change the value directly in the mysql database for a product the custom field for the datepicker value , in product backEnd update/reload the page of product edit mode don't update the value !
1) Can i change the behaviour .
2) Is there other location in mysql where the date value are retrieve ?

thank's

Last edit: 9 years 7 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #199772

If you change the value of a custom product field in the hikashop_product table, the new value will be displayed when you edit the product in the backend. I don't see why that wouldn't be the case.

Please Log in or Create an account to join the conversation.

Time to create page: 0.161 seconds
Powered by Kunena Forum