⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery CRUD Enterprise date and datetime fields



web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 17 October 2017 - 21:13 PM

Hello All,

 

As I am getting lot of emails and questions about date and datetime fields for Grocery CRUD Enterprise, I thought that it would be good to have an explanation about why Grocery CRUD Enteprise has took some different decisions for the dates from the community one. What mistakes did we make and why and what we will do at the future about it. So let's answer some questions:

 

Why you did change the dates from grocery CRUD community Johnny?

 

Many people was wondering why to change the dates from Community edition when it is already too good and it has the below features:
- date format can be specified by the developer
- the language of date is in the main language chosen from grocery CRUD
- the input looks the same for all the browsers

The answer for that is that I wanted to take it one step further. So the main reason that I did it was:

- date format is specified by the OS (e.g. Windows) of the user. So that mean that if the user for any reason want to change the format, it can happen by changing the format at his laptop/PC
- the UI/UX of the type date and datetime it is just amazing and really easy to use. Moreover you are familiar with it.

- the implementation is very easy and that means that it needs much less code in order to implement it

- we will always have the fallback of jQuery UI in case that the browser does not support it but I thought that very soon all the browsers will have them

- full mobile compatible. I think an image will convince you for that: https://mdn.mozillademos.org/files/14915/date-picker-fxa.png
- no need for extra translation of the days/months... e.t.c. as the input type date support all of that

The thing is that I saw users complaining about format and I have to be honest I didn't thought about some simple things:

- the language of the keyboard may be in English so the user will see English days instead of their native language
- famous browsers such us firefox and safari doesn't have in their plans to include input type date :(
- the transformation of the date in the columns is a bit unstable

- the developer wants to specify the date format so users will not be confused when they are traveling.

ok. So now that you saw there are some issues, what are your next steps?

 

I wanted to focus to other small bugs (not related with dates) and I didn't have the time to change the behaviour of date and datetime as it is really time consuming. The good news is that I've already answer with some work-arounds at the forums and don't get me wrong but for most of the users the date issues was not even noticeable. The only exception is the search of the dates that was frustrated (and noticeable) but now at the latest version (2.3.7) the column search for date and datetime has been improved as well. So what I am saying is that I can understand your urgency from your bosses/customers ( I really do!) but I really prefer to take my time and do it right rather than rush it and produce  extra bugs.

When are you going to do the changes that you are mentioning above?

 

Now for this I can't commit to any date just yet but this is now my next priority. If you would like to get informed once this new version is available please right a comment below with a "+1".

 

Thank you all for the feedback that I am getting for Grocery CRUD Enterprise as it is very positive and it also helps me improve the product.

 

Happy GCing :)
 

 

 

 


wildfandango

wildfandango
  • profile picture
  • Member

Posted 19 October 2017 - 21:24 PM

+1


larasmith

larasmith
  • profile picture
  • Member

Posted 23 October 2017 - 05:19 AM

+1


revup

revup
  • profile picture
  • Member

Posted 24 October 2017 - 20:41 PM

How do you input YYYY-mm-dd, same as php date('Y-m-d')?

 

NOTE: This should be a "must have" feature as most mysql databases store the dates as YYY-mm-dd and this makes the UI a lot more compatible.


web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 25 October 2017 - 07:14 AM

Hello All,

 

The development of the date and datetime fields is currently in progress at the moment and this is the number one priority. I am going to refactor the way that the date works and I will implement it with the  same way as Grocery CRUD Community. Please be patient till the next version. I will update you once this feature is available.

 

Regards

Johnny


Marty

Marty
  • profile picture
  • Member

Posted 25 October 2017 - 10:06 AM

Hi Johnny,
 
Concerning the refactoring I updated to 2.3.7. but now the search field for the dates are "way" to wide, creating wide date and datetime columns in relation to the column content, squeezing other columns into undesirable small widths.
 
Hope you can address this issue as well in the refactoring-process.
 
Regards,
Marty

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 25 October 2017 - 12:21 PM

Hello Marty,

 

As the refactoring is still in progress I will also have this in mind.

 

Regards

Johnny


web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 02 November 2017 - 05:38 AM

All of the above just mentioned are now live within the version 2.4.0. Exciting release and a big one (don't worry full backward compatible!) More specifically in this release we have:

2.4.0
- GC-229: Add the ability for the developer to choose a unique date format and input for all browsers.
- GC-242: Update to React Fiber (version 16)  :wub: 
- GC-240: Cover basic concepts so bootstrap v4 CSS will not break.
- GC-244: transfer all the jquery extra headers to the upload library as well (useful for CSRF and cross origin requests)

The only thing that you will need to have is this extra line at your config:
 

// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd)
'date_format' => 'uk-date',

I did also updated the documentation. 

Happy GCing  :D

 

Johnny


larasmith

larasmith
  • profile picture
  • Member

Posted 07 November 2017 - 07:04 AM

All of the above just mentioned are now live within the version 2.4.0. Exciting release and a big one (don't worry full backward compatible!) More specifically in this release we have:

2.4.0
- GC-229: Add the ability for the developer to choose a unique date format and input for all browsers.
- GC-242: Update to React Fiber (version 16)  :wub: 
- GC-240: Cover basic concepts so bootstrap v4 CSS will not break.
- GC-244: transfer all the jquery extra headers to the upload library as well (useful for CSRF and cross origin requests)

The only thing that you will need to have is this extra line at your config:
 

// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd)
'date_format' => 'uk-date',

I did also updated the documentation. 

Happy GCing  :D

 

Johnny

 

Dear Sir Johnny,

 

Adding the symbols: >,< to filter dates work but once the focus is out of the search area,

only the exact date and time is returned so it hinders the input of the

filters to broaden the search.

 

Kindly check.

 

Thanks!

 

Lara


wildfandango

wildfandango
  • profile picture
  • Member

Posted 07 November 2017 - 20:30 PM

All of the above just mentioned are now live within the version 2.4.0. Exciting release and a big one (don't worry full backward compatible!) More specifically in this release we have:

2.4.0
- GC-229: Add the ability for the developer to choose a unique date format and input for all browsers.
- GC-242: Update to React Fiber (version 16)  :wub: 
- GC-240: Cover basic concepts so bootstrap v4 CSS will not break.
- GC-244: transfer all the jquery extra headers to the upload library as well (useful for CSRF and cross origin requests)

The only thing that you will need to have is this extra line at your config:
 

// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd)
'date_format' => 'uk-date',

I did also updated the documentation. 

Happy GCing  :D

 

Johnny

 

Hi Johnny

 

I have set the date format as uk-date because in my country (Spain) the dates are written in dd/mm/yyyy format.

 

But now the calendar shows as the first day of the week on Sunday when in my country the first day of the week is Monday ... is it possible to solve this?

 

thx in advance

I have set the date format as xxx because in my country (Spain) the dates are written in dd / mm / yyyy format but now I have the problem that the calendar shows as the first day of the week on Sunday when in my country the first day of the week is Monday ... is it possible to solve this?

 

screenshot > https://drive.google.com/file/d/1qPSqfcUHpUdn-CUdThZUTdyas0axCCcZ/view?usp=sharing


web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 08 November 2017 - 06:00 AM

Hello @wildfandango,

 

At your JavaScript code (just make sure that it is after the load of grocery CRUD) you can add your own preferences as default behaviour of the calendar like this:
 

$.datepicker.setDefaults({
            firstDay: 1 // Starts on Monday
});

You can change any of the options from the documentation of jQuery Datepicker here: https://api.jqueryui.com/1.8/datepicker/ 

 

Enjoy  :D 
Johnny


wildfandango

wildfandango
  • profile picture
  • Member

Posted 08 November 2017 - 20:02 PM

It has worked perfectly!

 

thx a lot!


rkrajnik

rkrajnik
  • profile picture
  • Member

Posted 26 July 2020 - 19:59 PM

+1


mainery

mainery
  • profile picture
  • Member

Posted 23 November 2020 - 10:43 AM

mcdonalds survey offergrocery CRUD is an auto PHP Codeigniter CRUD generator that makes a developer's life easier. Just few lines of code and you can create a full stable Codeigniter CRUD with nice