Vitalii 2 Posted October 21, 2021 Report Share Posted October 21, 2021 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 Quote Link to post Share on other sites
alt_f4 57 Posted October 22, 2021 Report Share Posted October 22, 2021 Do you have any hints from the developer console (F12)? 1 Quote Link to post Share on other sites
jack 30 Posted October 22, 2021 Report Share Posted October 22, 2021 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 2 Quote Link to post Share on other sites
Vitalii 2 Posted October 23, 2021 Author Report Share Posted October 23, 2021 thank you, I'll try! Quote Link to post Share on other sites
Vitalii 2 Posted October 23, 2021 Author Report Share Posted October 23, 2021 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! Quote Link to post Share on other sites
Vitalii 2 Posted October 23, 2021 Author Report Share Posted October 23, 2021 On 10/22/2021 at 10:42 AM, alt_f4 said: Do you have any hints from the developer console (F12)? No, I have not any hints there Quote Link to post Share on other sites
Vitalii 2 Posted October 26, 2021 Author Report Share Posted October 26, 2021 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! 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.