Android Question disable future or past days in SDCalendarDialog

Abdull Cadre

Active Member
Licensed User

Attachments

  • DateDialog(3).zip
    12.6 KB · Views: 245

asales

Expert
Licensed User
Longtime User
In the sub "Sub FillCalendar", change this lines:
B4X:
Else
    Lab.Color=Colors.Transparent
    Lab.TextColor=Colors.Black
End If
to this:
B4X:
Else
    Lab.Color=Colors.Transparent
    Lab.TextColor=Colors.LightGray   '<==
    Lab.Enabled = False    '<== or make invisible : Lab.Visible = False
End If
 
Upvote 0

Abdull Cadre

Active Member
Licensed User
Thanks for the quick response. but I don't know if that's exactly what you got.


Today, for example, is the 8th, so I want to disable it from the 7th to every day of every month, previous years. according to this example:

 
Upvote 0

asales

Expert
Licensed User
Longtime User
Thanks for the quick response. but I don't know if that's exactly what you got.


Today, for example, is the 8th, so I want to disable it from the 7th to every day of every month, previous years. according to this example:
B4X:
If d=i Then
    Lab.Background=Corner(Color)
    Lab.Textcolor=Colors.White
    LabelNow=Lab
'NEW CODE
Else If d > i Then
    Lab.Color = Colors.Transparent
    Lab.TextColor = Colors.LightGray
    Lab.Enabled = False
Else
    Lab.Color = Colors.Transparent
    Lab.TextColor = Colors.Black
End If
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…