[Skip to main content](#vessel-content)

#   Custom field for future date

##

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

12 years 9 months ago [\#139010](#139010) by [JIK](/forum/user/362-jik "View JIK's Profile")  *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139010 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")* was created by *[JIK](/forum/user/362-jik "View JIK's Profile")*

-- HikaShop version -- : 2.2.2 Business
-- Joomla version -- : 2.5.16

I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.

I have two problems:

1. When I set the "Allow" field to "Only future dates" it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?

2. When I set the format to show as "Friday, 10-Jan-2014" using %D, %d-%M-%Y with Only future dates selected the front end gives an error "Please select a date in the future". Is there a way to set the format to display the long date when using the Only future dates value?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#139113](#139113) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139113 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")*

Hi,

The algorithm always accept today for future dates and past dates.
There is no special option to change it except using the "Dynamic Calendar".
[ www.hikashop.com/index.php?option=com\_hi...uct&amp;task=show&amp;cid=19](http://www.hikashop.com/index.php?option=com_hikashop&ctrl=product&task=show&cid=19)

About the second point. The system can't convert a date with a day in string format into a understandable date.
So for the checks made in javascript, it can't understand the "Friday" word.
The plugin dynamic calendar can help you too to solve this problem because it store the value using a fixed format value and display the date with your specific format.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

12 years 9 months ago [\#139143](#139143) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139143 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")*

Hi Jerone,

I purchased and installed the plugin. Whilst it looks nice on the front end, it has a few problems:

1. When I select "Only future dates" it still allows the current date to be selected.

2. When I specify a date format it instantly puts "Thu, 01-Jan-1970" in as the default value.

3. The language file appears to be missing so I'm not sure what each variable is supposed to do:
[ ![h0d4bc45.jpg](/forum/attachment/14599) ](/forum/attachment/14599 "h0d4bc45.jpg")

I tried to fix by loading the latest Hikashop language file but nothing changed.

- [ ![h0d4bc45.jpg](/forum/attachment/14599) ](/forum/attachment/14599 "h0d4bc45.jpg") [ ](/forum/attachment/14599?download=1 "h0d4bc45.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

12 years 9 months ago [\#139144](#139144) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139144 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")*

Hi again Jerome!

update - more issues...

1. As soon as I EDIT the custom field in the backend it populates the default date as 1 Jan 1970 even when there is no format specified.

2. I tried to set the default date to today (using the radio button) and it puts today's date (with the time) in as default in the frontend despite having "only future dates" selected. It also puts todays date into the default date parameter in the backend. Does this mean the default date is permanently hardcoded as this date?

3. The only way to clear the default date is to delete the custom field and create a new one and make all required changes on the first save.

Any suggestions?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#139166](#139166) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139166 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")*

Hi,

First, I will see how the language file of the plugin is not loaded.

About the future date and today. You have to enter a value for the option "waiting days".
It is an option to add days (or remove days) for the selection (in past or future).

To remove the default date, you have to remove the "required", clear the default and re-put the require.
This "required" option is generating the side effect. We will see how we can remove it only in the configuration panel.

If you use the option "default today", the date picker will choose today as default value (and will override the date you will configure as default value). When the "waiting days" are configure, the date picker will process the new default value it has to display.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

12 years 9 months ago [\#139389](#139389) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Custom field for future date](/forum/2-general-talk-about-hikashop/864851-custom-field-for-future-date#139389 "-- HikaShop version -- : 2.2.2 Business -- Joomla version -- : 2.5.16  I'm trying to setup a custom field for the user to select a future date that is greater than today's date (ie: from tomorrow onwards) for a required delivery date of the item. I have it in the item table and required so that the user can't add to cart if it is not selected.  I have two problems:  1. When I set the &quot;Allow&quot; field to &quot;Only future dates&quot; it still allows the user to select todays date. Possibly it is based on time rather than date? Is there a way to set this to be today's date +1 day?  2. When I set the format to show as &quot;Friday, 10-Jan-2014&quot; using %D, %d-%M-%Y with Only future dates selected the front end gives an error &quot;Please select a date in the future&quot;. Is there a way to set the format to display the long date when using the Only future dates value?  Thanks")*

Thanks - that works perfectly!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NDg1MS1jdXN0b20tZmllbGQtZm9yLWZ1dHVyZS1kYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.146 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
