如果在开始日期和结束日期之间有任何禁用日期,请提醒用户不要进行预订

时间:2018-01-08 13:14:35

标签: javascript jquery jquery-ui-datepicker

我有一个预订页面。例如,预订从2018-01-20开始,到2018-01-15结束。

如果某个日期2018-01-162018-01-10被停用,那么我们如何通知用户“2018-01-20$("#dateFrom").datepicker({ dateFormat: "dd.mm.y", monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], monthNamesShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], dayNamesMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], minDate: 0, beforeShowDay: ["2018-01-15","2018-01-16"], }); 之间有一些禁用日期,因此无法预订”。

不可点击的结束日期。

 public class MyFragment extends Fragment{
        TextView textView;
        View view;
        FloatingActionButton actionButton;

        @Override
        public View onCreateView(final LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
            view = inflater.inflate(R.layout.fragment_read, container, false); 

            textView = view.findViewById(R.id.txtSaved);
            actionButton = view.findViewById(R.id.floatingActionButton);

            actionButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    DialogSearch search = new DialogSearch();
                    search.show(getActivity().getSupportFragmentManager(),"MyDialog");
                }
            });
    return view;   / Add this line -------   
     }
    }

0 个答案:

没有答案