epos4u Posted June 6, 2017 Share Posted June 6, 2017 Hi, UnimDatePicker anyway to hide or only show dates from today + so people can't select dates in the past thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2017 Share Posted June 6, 2017 Hi, Which build? Quote Link to comment Share on other sites More sharing options...
epos4u Posted June 6, 2017 Author Share Posted June 6, 2017 Hi Delphi Developer using the latest Complete_Professional_1.0.0.1397_RC thank you brother Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2017 Share Posted June 6, 2017 hmm, I couldn't reproduce, sorry maybe I did not quite understand But, can you try to analyze this post for now ?!: http://forums.unigui.com/index.php?/topic/6852-year-range-mobile-datetimepicker/&do=findComment&comment=34851 Quote Link to comment Share on other sites More sharing options...
epos4u Posted June 6, 2017 Author Share Posted June 6, 2017 Hi, will explaing its for a booking, so i want to show today's date onwards, like 06 Jun 2017 so the customer can not select any prior dates like 05 Jun 2017 Thank you brother Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2017 Share Posted June 6, 2017 Hmm, sorry. Do you want to use like minDate? Quote Link to comment Share on other sites More sharing options...
epos4u Posted June 6, 2017 Author Share Posted June 6, 2017 Hmm, sorry. Do you want to use like minDate? yes, minDate should work if that's possible Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2017 Share Posted June 6, 2017 Ok, we will analyze Quote Link to comment Share on other sites More sharing options...
epos4u Posted June 6, 2017 Author Share Posted June 6, 2017 Ok, we will analyze thank you brother Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 7, 2017 Share Posted June 7, 2017 Hi, Can you try to use this approach for now ?!: 1. UnimDatePicker1 -> ... function afterCreate: function afterCreate(sender) { var me = sender; me.setPicker({ listeners: { pick: function(picker, value) { me._selectedDate = Ext.Date.format(value, 'Y-m-d'); } }, doneButton: { listeners: { tap: function(button, event, eOpts) { var _newDate = new Date(me._selectedDate); if (me.minDate > _newDate) { Ext.Msg.show({ showAnimation: false, hideAnimation: false, title: "Error", message: "Incorrect Date...", buttons: [Ext.MessageBox.OK], icon: Ext.MessageBox.ERROR }); return false; } } } } }) } 2. UnimFormReady: procedure TMainmForm.UnimFormReady(Sender: TObject); begin UnimDatePicker1.JSInterface.JSCode(#1'.minDate=new Date("2017-06-07");'); end; Best regards, Quote Link to comment Share on other sites More sharing options...
epos4u Posted June 7, 2017 Author Share Posted June 7, 2017 Hi Delphi Developer works perfect Thank you brother Quote Link to comment Share on other sites More sharing options...
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.