Jump to content
X2Community Forums

new created field date does not save data


Recommended Posts

I have created new field in module "Contacts" by X2Studio to save clients birthdays. I selected type "date" for new field. But now I have 2 problem

1. I can't chose date before 2010 year

2. I try to save date in new field, but it does not be saved. And if I save date directly in new field of SQL-base I will get the date in my CRM

And I have to have date field, because I going to import birthdays from another CRM

Link to post
Share on other sites
  • Vitalii changed the title to new created field date does not save data

Hi Vitalii,
Go to protected/models/X2Model.php then find "$pickerOptions" under "case 'date':" and add "'yearRange' => '-100:+100'," to the array so it looks like.
                $pickerOptions = array(// jquery options
                    'dateFormat' => Formatter::formatDatePicker(),
                    'changeMonth' => false,
                    'changeYear' => true,
                    'yearRange' => '-100:+100',
                );
This will allow you to pick 100 years into the future or past.
-Jack

  • Like 2
Link to post
Share on other sites
15 hours ago, jack said:

Hi Vitalii,
Go to protected/models/X2Model.php then find "$pickerOptions" under "case 'date':" and add "'yearRange' => '-100:+100'," to the array so it looks like.
                $pickerOptions = array(// jquery options
                    'dateFormat' => Formatter::formatDatePicker(),
                    'changeMonth' => false,
                    'changeYear' => true,
                    'yearRange' => '-100:+100',
                );
This will allow you to pick 100 years into the future or past.
-Jack

Thank you! It worked!

Link to post
Share on other sites

I have found out what the problem is. I am using localized version (russian), and there was the problem in viewing date-type with date-picker plugin. I set English version, now I have not this problem. Thank you!

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...