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

#   Advanced Date Picker - default value on backend

##

- **[3by400](/forum/user/6842-3by400 "View 3by400's Profile")**
- [![3by400's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6842.jpg)](/forum/user/6842-3by400 "View 3by400's Profile") Topic Author
- [ Offline](/forum/user/6842-3by400)

Less More

- Posts: 211
- Thank you received: 14
-
-
- [](https://3by400.com)
-

10 years 9 months ago [\#227085](#227085) by [3by400](/forum/user/6842-3by400 "View 3by400's Profile")  *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227085 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")* was created by *[3by400](/forum/user/6842-3by400 "View 3by400's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : No error message.

If the "Default today" field is set to Yes, then anytime the advanced date picker field is subsequently edited the "Default Value" defaults to today's date, or the next available date if "Waiting days" or "Hour for extra day" is configured.

This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.

---

3by400, Inc.
[ 3by400.com](https://3by400.com)
Websites that Work, Marketing that Matters

- [ ![Administration&#95;-&#95;Field&#95;&#95;order&#95;deliverydate&#95;2016-01-20&#95;10-02-19.png](/forum/attachment/28980) ](/forum/attachment/28980 "...0&#95;10-02-19.png") [ ](/forum/attachment/28980?download=1 "...0&#95;10-02-19.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 9 months ago [\#227100](#227100) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227100 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")*

Hi,

Try to change the line: Code:

if(!empty($value) &amp;&amp; !empty($default_value) &amp;&amp; !empty($datepicker_options['today']) &amp;&amp; ((int)$value == (int)$default_value)) {

to: Code:

if(!empty($value) &amp;&amp; !empty($default_value) &amp;&amp; !empty($datepicker_options['today']) &amp;&amp; $test &amp;&amp; ((int)$value == (int)$default_value)) {

in the file plugins/hikashop/datepickerfield/datepickerfield_class.php and see if that helps.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[3by400](/forum/user/6842-3by400 "View 3by400's Profile")**
- [![3by400's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6842.jpg)](/forum/user/6842-3by400 "View 3by400's Profile") Topic Author
- [ Offline](/forum/user/6842-3by400)

Less More

- Posts: 211
- Thank you received: 14
-
-
- [](https://3by400.com)
-

10 years 9 months ago [\#227149](#227149) by [3by400](/forum/user/6842-3by400 "View 3by400's Profile")  Replied by *[3by400](/forum/user/6842-3by400 "View 3by400's Profile")* on topic *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227149 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")*

I've swapped out that line of code, but it had no affect on the default value field. When "Default to today" is set the Default Value field stlil auto-loads with the next available date.

---

3by400, Inc.
[ 3by400.com](https://3by400.com)
Websites that Work, Marketing that Matters

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 9 months ago [\#227168](#227168) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227168 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")*

Hi,

When you have the "default today" setting ; you don't mind what value is display in your backend because in any case, the "today" date will be display in your backend and in your frontend.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[3by400](/forum/user/6842-3by400 "View 3by400's Profile")**
- [![3by400's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6842.jpg)](/forum/user/6842-3by400 "View 3by400's Profile") Topic Author
- [ Offline](/forum/user/6842-3by400)

Less More

- Posts: 211
- Thank you received: 14
-
-
- [](https://3by400.com)
-

10 years 9 months ago -  10 years 9 months ago [\#227252](#227252) by [3by400](/forum/user/6842-3by400 "View 3by400's Profile")  Replied by *[3by400](/forum/user/6842-3by400 "View 3by400's Profile")* on topic *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227252 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")*

Hi Jerome -

Actually, it does matter because when the advanced date picker field is subsequently edited, and the "Default Value" field has been auto-filled with today's date, then the field is saved again and now the Default Value will remain that static date rather than updating to the actual current date.

The bug is present when the field is edited.

---

3by400, Inc.
[ 3by400.com](https://3by400.com)
Websites that Work, Marketing that Matters

Last edit: 10 years 9 months ago by [3by400](/forum/user/6842-3by400 "View 3by400's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 9 months ago [\#227291](#227291) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Advanced Date Picker - default value on backend](/forum/3-bug-report/881671-advanced-date-picker-default-value-on-backend#227291 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : No error message.  If the &quot;Default today&quot; field is set to Yes, then anytime the advanced date picker field is subsequently edited the &quot;Default Value&quot; defaults to today's date, or the next available date if &quot;Waiting days&quot; or &quot;Hour for extra day&quot; is configured.  This results in the Default Value being inadvertently saved if the Default Value field is not manually cleared out each time the field is edited.")*

Hi,

I am sorry but I still don't understand your point of view.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODE2NzEtYWR2YW5jZWQtZGF0ZS1waWNrZXItZGVmYXVsdC12YWx1ZS1vbi1iYWNrZW5kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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.053 seconds

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