Well, it is important to look at the traceback, and try to understand what it is telling you.
AttributeError 'NoneType' has no attribute .text means you tried to access a .text attribute on an object which is None.
So, if you look at where you try to access .text, you will see it is date['label1'] -- so for some reason, that lookup is returning None. That must mean there is no subview named label1 within the view you are accessing.
Since you didn't provide the contents of your pyui or code that creates your view, it is hard to debug remotely. You can rename your .pyui to .json, and copy/paste to the forum. Common mistakes include:
If you have views that have subviews that have othe subviews, you might be referring to a label1 which is a subview of a different subview, not the date subview.
you may have spelled the name wrong.
maybe you were copying code from the forums, but you haven't actually created the same view structure. This code seems to expect a button within the main view, the main view has a subview called datepicker, and the datepicker view has a subview called label1. Is that what you intended? Or maybe you meant sender.superview['label1'] ?
Also, as a suggestion, you should usually create a new post, rather than replying to someone else's post when you have an unrelated question.